@adico/sequencegenerator

Time Sortable Distributed Unique Id Generator based on Twitter Snowflake

Usage no npm install needed!

<script type="module">
  import adicoSequencegenerator from 'https://cdn.skypack.dev/@adico/sequencegenerator';
</script>

README

@adico/sequencegenerator

Travis CI Build Status NPM version NPM downloads Dependency Status Dev Dependency Status
Patreon donate button Flattr donate button Liberapay donate button PayPal donate button

Time Sortable Distributed Unique Id Generator based on Twitter Snowflake

Usage

Complete API Documentation.

API

Install locally npm install --save @adico/sequencegenerator, then use like so:

import SequenceGenerator from '@adico/sequencegenerator'

// Generate Unique Id based on NodeId as hashed MAC address
console.log(new SequenceGenerator(254).nextId())

Advanced

Install

npm

  • Install: npm install --save @adico/sequencegenerator
  • Import: import * as pkg from ('@adico/sequencegenerator')
  • Require: const pkg = require('@adico/sequencegenerator')

Editions

This package is published with the following editions:

  • @adico/sequencegenerator aliases @adico/sequencegenerator/index.js which uses the Editions Autoloader to automatically select the correct edition for the consumer's environment
  • @adico/sequencegenerator/src/index.ts is TypeScript source code with Import for modules
  • @adico/sequencegenerator/edition-esnext/index.js is TypeScript compiled against ESNext for Node.js with Require for modules
  • @adico/sequencegenerator/edition-es5/index.js is TypeScript compiled against ES5 for Node.js with Require for modules

History

Discover the release history by heading on over to the HISTORY.md file.

Contribute

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

Backers

Maintainers

These amazing people are maintaining this project:

Sponsors

No sponsors yet! Will you be the first?

Patreon donate button Flattr donate button Liberapay donate button PayPal donate button

Contributors

These amazing people have contributed code to this project:

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

License

Unless stated otherwise all works are:

and licensed under: