
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
> Secure, customizable password generator for Node.js — supports complexity rules, exclusions, and bulk generation.
Secure, customizable password generator for Node.js — supports complexity rules, exclusions, and bulk generation.
crypto.getRandomValues() for secure randomnessnpm install pass-utils
const { generatePassword } = require("pass-utils");
const password = generatePassword(16, {
uppercase: true,
lowercase: true,
numbers: true,
symbols: true,
similar: false,
exclude: "aeiou",
}, {
minUpper: 2,
minLower: 4,
minNumbers: 2,
minSymbols: 2,
});
console.log(password); // Output: "Kf#7gR!cP2xMbL9q"
const { generateMultiplePasswords } = require("pass-utils");
const passwords = generateMultiplePasswords(5, 12, {
symbols: false,
similar: true,
}, {
minUpper: 1,
minLower: 3,
minNumbers: 2,
});
console.log(passwords);
/*
Output:
[
'gZ0rWx8BkpAf',
'uzhB3yDA0wkd',
'MkwbpZ08uhxy',
'2WyuDfR6vhga',
'3bHJw96zFqmt'
]
*/
generatePassword(length, options?, requirements?)
| Parameter | Type | Description |
|---|---|---|
length | number | Length of the generated password |
options | object | Optional settings for character types and exclusions (default: all enabled) |
requirements | object | Optional requirements for minimum characters per type |
Options object
| Parameter | Type | Default | Description |
|---|---|---|---|
uppercase | boolean | true | Include uppercase letters |
lowercase | boolean | true | Include lowercase letters |
numbers | boolean | true | Include numbers |
symbols | boolean | true | Include special characters |
similar | boolean | true | Allow similar-looking characters (like O, 0, l, 1) |
exclude | string | "" | Custom string of characters to exclude |
Requirements object
| Key | Type | Default | Description |
|---|---|---|---|
minUpper | number | 0 | Minimum number of uppercase characters |
minLower | number | 0 | Minimum number of lowercase characters |
minNumbers | number | 0 | Minimum number of numeric characters |
minSymbols | number | 0 | Minimum number of special characters |
FAQs
> Secure, customizable password generator for Node.js — supports complexity rules, exclusions, and bulk generation.
We found that pass-utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.