Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/detronetdip/idrand
A npm package for generating random alphanumeric id
https://github.com/detronetdip/idrand
idgenerator javascript npm-package
Last synced: about 1 month ago
JSON representation
A npm package for generating random alphanumeric id
- Host: GitHub
- URL: https://github.com/detronetdip/idrand
- Owner: detronetdip
- Created: 2021-10-03T06:23:27.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-03T06:53:49.000Z (about 3 years ago)
- Last Synced: 2024-10-01T16:09:32.460Z (about 2 months ago)
- Topics: idgenerator, javascript, npm-package
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/idrand
- Size: 2.93 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# idrand
A random alphanumeric id generator.
### Usage
First install it using `npm`;
```
npm i idrand
```
then `require` `idrand` in your code.
```
const newId = require('idrand');
```
Now you can call `newId` in order to get a random alphanumeric `id`.```
const id = newId();
```
By default it returns 10 digit alhanumeric id but you can specify the digit to be returned at the time of calling the function.If you need 25 digit alphanumeric id you can write -
```
const id=newId(25);
```
and it will return 25 digit alphanumeic id.