https://github.com/mjancarik/easy-uid
Easy unique id generator for node and browser
https://github.com/mjancarik/easy-uid
Last synced: about 2 months ago
JSON representation
Easy unique id generator for node and browser
- Host: GitHub
- URL: https://github.com/mjancarik/easy-uid
- Owner: mjancarik
- Created: 2018-09-07T14:29:57.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-12-25T22:41:42.000Z (almost 4 years ago)
- Last Synced: 2025-04-05T05:30:20.036Z (8 months ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# easy-uid
[](https://travis-ci.org/mjancarik/easy-uid)
[](https://coveralls.io/github/mjancarik/easy-uid?branch=master)
[](https://www.npmjs.com/package/easy-uid)
[](https://github.com/prettier/prettier)
Easy uid is the smallest (70 bytes) random URL-friendly uid generator based on `Math.random` for browser and node without external dependencies. It is useful for generating uid where is no need horizontal scaling and cryptographically security. For example: React Components key, element ids, etc.
## Installation
```
npm i easy-uid --save
```
## Usage
``` javascript
import uid from 'easy-uid';
uid(); //1cdcjhb913ov1a
```