keymachine
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

Keymachine

Zero dependency, lightweight and simple key generator for the JS world

Usage Fields

Keymachine works very well in cases such as automatically assigned Email passwords, private invitation codes, verification keys, automatic link creation, etc.

Installation

Npm:

npm install keymachine

Yarn:

yarn add keymachine

Browsers:

<script src="https://unpkg.com/keymachine@2.1.0/index.js"></script>

Example Usage

 
 /*
   Default configurations comes as:
   length: 24
   possibility: 'abcdefghijklmnopqrstuvwxyz0123456789'
   case: 'mixed'
 */
 
 // Calling the module (only if installed via npm or yarn)
 import keymachine from 'keymachine';
 
 /* with defaults */
 let randomKey = keymachine();
 
 /* with custom configurations */
 let randomKey = keymachine({ possibility: 'KJAUZNSO27AJSND', length: 18, case: 'upper' });
 

Package Sidebar

Install

npm i keymachine

Weekly Downloads

2

Version

2.1.0

License

MIT

Unpacked Size

4.66 kB

Total Files

5

Last publish

Collaborators

  • onurrozkaan