tokenobj
v1.0.1
Published
Make self-explanatory JSON-able token objects.
Downloads
3
Readme
tokenobj
Make self-explanatory JSON-able token objects.
Usage
var tokenObj = require('tokenobj'), D = require('./lib_demo.js'),
real = tokenObj('totally legit'),
fake = tokenObj(real.tokenPurpose),
tkn;
console.dir({ real: real, fake: fake });
//= `{ real: TokenObject { tokenPurpose: 'totally legit' },`
//= ` fake: TokenObject { tokenPurpose: 'totally legit' } }`
D.jsonDump({ real: real, fake: fake });
//= `{ "real": { "tokenPurpose": "totally legit" },`
//= ` "fake": { "tokenPurpose": "totally legit" } }`
For more "how", see doc/demo/usage.js.
For more "why", see doc/demo/userdb.demo.js.
License
ISC