key-creator
v1.3.8
Published
A mini library for generating keys.
Downloads
11
Maintainers
Readme
key-creator
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.