@guntur/randid
v0.1.0
Published
Generate a random string or id
Downloads
15
Readme
randid
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:
options
:<Options>
- Returns:
Promise<string>
randid.sync(options
)
- Params:
options
:<Options>
- Returns:
<string>
Options
length
:<number>
- default:
12
- default:
License
MIT © Guntur Poetra