Skip to content

Commit

Permalink
update md
Browse files Browse the repository at this point in the history
  • Loading branch information
Webb committed Jun 2, 2019
1 parent 224984c commit 52c7efe
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# uuid-int

uuid-int for nodejs

## Quick Start

Install

```
npm install --save uuid-int
```

Use

```
const UUID = require('uuid-int');
// number 0 <= id <=511
const id = 0;
const generator = UUID(id);
const uuid = generator.uuid();
console.log(uuid); // 3270411116609537
```
6 changes: 3 additions & 3 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ const UUID = require('uuid-int');
// 设定一个int类型的id, 范围在 [0, 511]之间
const id = 0;
// 使用id初始化发号器
const one = UUID(id);
// 使用id初始化
const generator = UUID(id);
// 生成
const uuid = one.uuid();
const uuid = generator.uuid();
console.log(uuid); // 3270411116609537
```

Expand Down

0 comments on commit 52c7efe

Please sign in to comment.