https://github.com/iguntur/randid
Generate random string or ID
https://github.com/iguntur/randid
Last synced: 4 months ago
JSON representation
Generate random string or ID
- Host: GitHub
- URL: https://github.com/iguntur/randid
- Owner: iguntur
- License: mit
- Created: 2019-04-04T16:11:26.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-04T16:24:49.000Z (about 6 years ago)
- Last Synced: 2025-02-08T09:51:19.675Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# randid
[](https://travis-ci.com/iguntur/randid)
[](https://www.npmjs.org/package/@guntur/randid)
[](https://nodejs.org)> Generate a random string or id
---
## Install
```console
$ npm install @guntur/randid
```## Usage
```js
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`### randid.sync(`options`)
- Params:
- `options`: [``](#options)
- Returns: ``#### `Options`
- `length`: ``
- default: `12`## License
MIT © [Guntur Poetra](https://github.com/iguntur)