1.0.1 • Published 3 years ago

tokenmgr v1.0.1

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
3 years ago

🚀 Get started!

The first step is to import the module in your node.

const tokenmgr = require("tokenmgr");

Then, initialize a new instance of the manager.

const tm = new tokenmgr();

👩‍💻 How to create tokens?

You have to a single line to create a token.

tm.create(64, {});

To add creation options, specify them into the braces.

tm.create(64, {
  avoidNumbers: true,
  allUpperCase: true,
  allLowerCase: true,
});

To disable an option, you just have to remove it from the table.

All options are disabled by default.

💾 How to store them ?

Just use the tm.store() function.

tm.store("name", token);

// You can create a token directly into the 'tm.store()' function.
tm.store("name", token);

Delete tokens with the tm.del() function.

tm.del("name");

And get them with the tm.get() function.

tm.get("name");