key-creator

1.3.8 • Public • Published

key-creator Build Status License: GPL v3 Generic badge Maintenance

key-creator is a mini library to generate secure keys or passwords when developing your apps.

Documentation

key-creator is fully documented. It is rewritten with TypeScript to make the code less error-prone and maintainable.

Example

To install the library from NPM packages write below to the terminal:

npm install key-creator

You can start using library just including it like below:

const key = require('key-creator');

Here is a example about how to generate a key for your app and use it:

const key = require('key-creator');
 
class User {
 
    constructor(name) {
        this.id = key.generate();
        this.name = name;
    }
 
    printUser() {
        console.log(`@${this.id}[${this.name}]`);
    }
}
 
user = new User('Edward Burke');
user.printUser();

This example will create an ID field for the user and assign it using the generate function.

Licence

key-creator is GNU Licensed.

Package Sidebar

Install

npm i key-creator

Weekly Downloads

0

Version

1.3.8

License

AGPL-3.0

Unpacked Size

41.1 kB

Total Files

16

Last publish

Collaborators

  • thankfulbird