Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iguntur/randid
Generate random string or ID
https://github.com/iguntur/randid
Last synced: about 11 hours 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 (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-04-04T16:24:49.000Z (over 5 years ago)
- Last Synced: 2024-10-29T01:48:45.196Z (10 days 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
[![Build Status](https://travis-ci.com/iguntur/randid.svg?token=Gqg6SWkLJ3YyFSAu5i3M&branch=master)](https://travis-ci.com/iguntur/randid)
[![npm](https://img.shields.io/npm/v/@guntur/randid.svg?style=flat)](https://www.npmjs.org/package/@guntur/randid)
[![node](https://img.shields.io/node/v/@guntur/randid.svg?style=flat)](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)