Generate secure random passwords with customizable options and strength checking.
import { password } from 'toolmetry';| Function | Parameters | Returns | Description |
|---|---|---|---|
passwordGenerate | options?: PasswordOptions | string | Generate a random password |
passwordPassphrase | options?: { words?, separator?, capitalize? } | string | Generate a passphrase |
passwordStrength | password: string | { score, label, suggestions } | Check password strength |
passwordGenerateBatch | count: number, options?: PasswordOptions | string[] | Generate multiple passwords |
import { passwordGenerate } from 'toolmetry';
const pwd = passwordGenerate({ length: 20, symbols: true });
// "aB3$xY9!kL2@mN5#pQ8"
const simple = passwordGenerate({ length: 8, digits: true, symbols: false });
// "aB3xY9kL"import { passwordPassphrase } from 'toolmetry';
const phrase = passwordPassphrase({ words: 4, separator: '-', capitalize: true });
// "Brave-Cloud-Eagle-Flame"import { passwordStrength } from 'toolmetry';
const result = passwordStrength('MyP@ss123');
// { score: 5, label: "Strong", suggestions: [] }