Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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