https://github.com/dy/get-uid
Generate unique numeric id.
https://github.com/dy/get-uid
Last synced: 8 months ago
JSON representation
Generate unique numeric id.
- Host: GitHub
- URL: https://github.com/dy/get-uid
- Owner: dy
- License: unlicense
- Created: 2015-01-25T14:10:47.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-01-25T14:17:31.000Z (over 11 years ago)
- Last Synced: 2024-05-02T00:03:53.144Z (about 2 years ago)
- Language: JavaScript
- Size: 117 KB
- Stars: 11
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-unique-id - get-uid - uid)) - Simple random id generator. (Generation)
README
# get-uid [](https://travis-ci.org/dfcreative/get-uid) [](https://codeclimate.com/github/dfcreative/get-uid)
Simple random id generator.
`$ npm install get-uid`
```js
var getUid = require('get-uid');
getUid(); //1178851014
getUid(); //811233864
...
```
Yet another one uid generator? There are already some:
* gen-uid
* unique
* uid
* uid2
* uid-util
* micro-uid
* component-uid
* j-uid
* unique-id
* uniqid
* short-uid
* puid
* amp-unique-id
* genuid
* simple-uid
* random-id
* smart-id
* uuid-pure
* simple-random-id
* nid
This one is just shorter and simpler, almost like `id++`, but with no bad side-effects. The technique is used innerly by [Financial Times’ WeakSet](https://github.com/Financial-Times/polyfill-service/blob/master/polyfills/WeakSet/polyfill.js), [Web-components’ WeakMap](https://github.com/webcomponents/webcomponentsjs/blob/master/src/WeakMap/WeakMap.js) and so on.
[](https://nodei.co/npm/get-uid/)