# node-snowflake

> a node.js clone for twitter snowflake

Latest version **0.0.1** (published 2014-03-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-snowflake
pnpm add node-snowflake
yarn add node-snowflake
bun add node-snowflake
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2014-03-01 |
| First published | 2014-03-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 36 |
| Author | Kurten Chan |
| Maintainers | kurten |
| Keywords | node.js, javascript, snowflake, twitter |

## Links

- npm: https://www.npmjs.com/package/node-snowflake
- Repository: http://github.com/kurten/node-snowflake
- Issues: https://github.com/kurten/node-snowflake/issues
- npm.io page: https://npm.io/package/node-snowflake

## Recent versions

- 0.0.1 (latest) — 2014-03-01

## README

node-snowflake
==============

node-snowflake is a node.js clone for [twitter snowflake](https://github.com/twitter/snowflake).

###how to use
<code>
>//only run simple http server <br>
> require('node-snowflake').Server(3001);   <br><br>
>//request url example:GET http://localhost:3001/next_id?worker_id={optional}&data_center_id={optional}&sequence={optional} <br><br>
>//response : {"id":"439658373735124992"}
</code>

--------------------------
<code>
>//only run snowflake nextId<br>
>var snowflake = require('node-snowflake').Snowflake;<br>
>var id = snowflake.nextId(); // use default set<br>
>//or <br>
>//snowflake.init({worker_id : 1, data_center_id : 1, sequence : 0});<br>
>//var id = snowflake.nextId();<br>
>console.log(id);
</code>


###see examples/example.js

---
_Source: https://npm.io/package/node-snowflake · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
