Socket
Socket
Sign inDemoInstall

omgopass

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    omgopass

A tiny memorable password generator for Node.js and browsers


Version published
Weekly downloads
6.6K
decreased by-25.01%
Maintainers
1
Install size
8.57 kB
Created
Weekly downloads
 

Readme

Source

omgopass

npm Build Status Dependencies

A tiny memorable password generator

  • Fast: 600 times faster than password-generator
  • Small: 322 bytes (minified and gzipped)
  • Secure: Uses cryptographically strong random API instead of Math.random
  • No dependencies
  • Supports Node.js and browsers

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.

Generate password online

Install

npm install omgopass --save

Usage

import generatePassword from "omgopass";
const password = generatePassword(); // "Tu6Log5Bam4"
Advanced Usage
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: "бвгджзклмнпрстчш"
}); // "Зер_Коти-Лов_Меч"
Recipe: Generate random passphrase

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"
Available options
NameDescriptionDefault
syllablesCountInteger, count of syllables3
minSyllableLengthInteger, minimal length of a syllable2
maxSyllableLengthInteger, max length of a syllable3
hasNumbersBoolean, put numbers in the passwordtrue
titlecasedBoolean, use titlecasetrue
vowelsString, vowel alphabet'aeiouy'
consonantsString, consonant alphabet'bcdfghklmnprstvz'
separatorsString, symbols that separate syllables''

Benchmark

nameops/secsize (bytes)memorablebrowsernode
omgopass1 430 233322truetruetrue
password-generator2 163644truetruetrue
generate-password696 006740falsefalsetrue
randomatic29 7961 740falsetruetrue
secure-random-password7 6228 939falsetruetrue
niceware327 805195 584truetruetrue
xkpasswd793 456732 160truefalsetrue

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.

Supporting IE11 and obsolete platforms

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

Keywords

FAQs

Last updated on 05 Aug 2020

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc