@adico/sequencegenerator 中文文档教程
@adico/sequencegenerator
基于 Twitter Snowflake
Usage
API
在本地安装 npm install --save @adico/sequencegenerator
,然后像这样使用:
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
了以下版本:
@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
这个包发布 HISTORY.md 文件。
Contribute
通过继续了解您可以如何做出贡献到 CONTRIBUTING.md
文件。
Backers
Maintainers
这些了不起的人正在维护这个项目:
Sponsors
还没有赞助商! 你会是第一个吗?
Contributors
这些了不起的人为这个项目贡献了代码:
通过前往 CONTRIBUTING.md
文件发现您可以如何做出贡献。
License
除非另有说明,否则所有作品都是:
- Copyright © 2019+ adico
和获得许可:
@adico/sequencegenerator
Time Sortable Distributed Unique Id Generator based on Twitter Snowflake
Usage
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
- 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?
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:
- Copyright © 2019+ adico
and licensed under: