0.1.0 • Published 6 years ago

@guntur/randid v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

randid

Build Status npm node

Generate a random string or id


Install

$ npm install @guntur/randid

Usage

const randid = require('@guntur/randid');

randid().then(str => {
    console.log(str);
    //=> l43xxapV9aWq
});

console.log(randid.sync({length: 24}));
//=> x3qAJC3d7ra4IafxmtXEqWkK

API

randid(options)

  • Params:
  • Returns: Promise<string>

randid.sync(options)

Options

  • length: <number>
    • default: 12

License

MIT © Guntur Poetra