# seqid

> Signed Integer sequential id generator. Similar to TCP sequencing.

Latest version **1.0.1** (published 2014-08-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install seqid
pnpm add seqid
yarn add seqid
bun add seqid
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2014-08-19 |
| First published | 2014-08-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Bryce B. Baril |
| Maintainers | bryce |
| Keywords | id, squence |

## Links

- npm: https://www.npmjs.com/package/seqid
- Repository: git@github.com:brycebaril/seqid
- Homepage: https://github.com/brycebaril/seqid
- Issues: https://github.com/brycebaril/seqid/issues
- npm.io page: https://npm.io/package/seqid

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2014-08-19
- 1.0.0 — 2014-08-16

## README

seqid
=====

[![NPM](https://nodei.co/npm/seqid.png)](https://nodei.co/npm/seqid/)

`seqid` is a sequential id generator of the simplest variety. It is inspired by TCP sequencing, such that it will just generate integer sequential ids.

The ids generated are signed integers, I.e. if the id being generated would ever exceed 2147483648 it rolls over to -2147483647 and continues.

This means you can get repeated ids if you generate enough.

The ideal use-case for this tool is generating ephemeral ids for communication or coordination or matching.

```javascript
var SeqId = require("seqid")

var id = SeqId(0)
console.log(id.next()) // 1
console.log(id.next()) // 2
```

API
===

`var id = require("seqid")([initial])`
---

Create the id generator with optional `initial` value. Otherwise it will generate a random initial value.

`id.next()`
---

Get the next value in sequence. It will always be a signed integer.

LICENSE
=======

MIT

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