
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
A tiny memorable password generator
password-generator
Math.random
Why you should consider using omgopass in your project? The library's goal is to provide the fastest and the smallest (in terms of the bundle size) password generation solution. We have performed a bunch of benchmarks against popular password generation libraries, and omgopass currently beats them all.
npm install omgopass --save
import generatePassword from "omgopass";
const password = generatePassword(); // "Tu6Log5Bam4"
generatePassword({ hasNumbers: false }); // "MunBedKod"
generatePassword({ syllablesCount: 5 }); // "Rot2Ba5Vim1My8Red4"
generatePassword({ titlecased: false }); // "si5co3ve8"
generatePassword({
syllablesCount: 4,
minSyllableLength: 3,
maxSyllableLength: 4,
hasNumbers: false,
titlecased: true,
separators: "-_",
vowels: "аеиоуэюя",
consonants: "бвгджзклмнпрстчш"
}); // "Зер_Коти-Лов_Меч"
Looking for long passwords that are easy to remember but hard to guess? Try to generate random passphrase instead.
generatePassword({
minSyllableLength: 4,
maxSyllableLength: 6,
hasNumbers: false,
titlecased: false,
separators: " "
}); // "goferu lipeba cyzex"
Name | Description | Default |
---|---|---|
syllablesCount | Integer, count of syllables | 3 |
minSyllableLength | Integer, minimal length of a syllable | 2 |
maxSyllableLength | Integer, max length of a syllable | 3 |
hasNumbers | Boolean, put numbers in the password | true |
titlecased | Boolean, use titlecase | true |
vowels | String, vowel alphabet | 'aeiouy' |
consonants | String, consonant alphabet | 'bcdfghklmnprstvz' |
separators | String, symbols that separate syllables | '' |
name | ops/sec | size (bytes) | memorable | browser | node |
---|---|---|---|---|---|
omgopass | 1 430 233 | 322 | true | true | true |
password-generator | 2 163 | 644 | true | true | true |
generate-password | 696 006 | 740 | false | false | true |
randomatic | 29 796 | 1 740 | false | true | true |
secure-random-password | 7 622 | 8 939 | false | true | true |
niceware | 327 805 | 195 584 | true | true | true |
xkpasswd | 793 456 | 732 160 | true | false | true |
Benchmark results were generated on a MBP 2018, 2,3 GHz Intel Core i5. To perform these tests, execute npm run benchmark
in the library folder.
This library uses features like destructuring assignment and const/let
declarations and doesn't ship with ES5 transpiled sources. If you aim to support browsers like IE11 and below → make sure you run Babel over your node_modules
FAQs
A tiny memorable password generator for Node.js and browsers
The npm package omgopass receives a total of 7,032 weekly downloads. As such, omgopass popularity was classified as popular.
We found that omgopass demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.