Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tflanagan/node-flake-id
Generate 64-Bit (with 63 signigicant bits) k-ordered, conflict-free ids in a distributed environment.
https://github.com/tflanagan/node-flake-id
Last synced: about 2 months ago
JSON representation
Generate 64-Bit (with 63 signigicant bits) k-ordered, conflict-free ids in a distributed environment.
- Host: GitHub
- URL: https://github.com/tflanagan/node-flake-id
- Owner: tflanagan
- License: other
- Created: 2017-11-14T02:20:53.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-14T02:23:13.000Z (about 7 years ago)
- Last Synced: 2024-11-06T11:48:45.148Z (2 months ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Flake ID
========Generate 64-Bit (with 63 signigicant bits) k-ordered, conflict-free ids in a distributed environment.
## Installation
`$ npm install --save [email protected]:node-portal/flake-id.git`## Usage
```js
const FlakeId = require('flake-id');const flakeid = new FlakeId({
epoch: 0,
worker: 0,
datacenter: 0,
seqMask: 0xFFF
});flakeid.get();
//
```Returns a [Buffer](https://nodejs.org/api/buffer.html) object