Skip to content

berakoc/key-creator

Repository files navigation

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.

About

A minimal key generator for node-js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published