# incr

> increment a counter with optional radix

Latest version **1.0.1** (published 2015-01-30) · MIT license · 0 weekly downloads

## Install

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

## 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 | 2015-01-30 |
| First published | 2014-05-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tom Hummel |
| Maintainers | tphummel |
| Keywords | autoincrement, increment, id, base36, base16, radix |

## Links

- npm: https://www.npmjs.com/package/incr
- Repository: git@github.com:tphummel/node-incr
- Homepage: https://github.com/tphummel/node-incr
- Issues: https://github.com/tphummel/node-incr/issues
- npm.io page: https://npm.io/package/incr

## 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) — 2015-01-30
- 1.0.0 — 2014-05-14
- 0.0.0 — 2014-05-14

## README

# node-incr

[![Build Status](https://travis-ci.org/tphummel/node-incr.png)](https://travis-ci.org/tphummel/node-incr)

[![NPM](https://nodei.co/npm/incr.png?downloads=true)](https://nodei.co/npm/incr/)

[![testling badge](https://ci.testling.com/tphummel/node-incr.png)](https://ci.testling.com/tphummel/node-incr)

a counter that will return decimal integers starting at 1 by default. optionally start the counter at another number and/or use a different radix

# install

    npm install incr

# test

    npm test

# usage

    var Increment = require("incr")

    var inc = new Increment()
    console.log(inc.next()) // 1
    console.log(inc.next()) // 2
    console.log(inc.next()) // 3
    inc.reset()
    console.log(inc.next()) // 1

    var inc = new Increment({start: 10})
    console.log(inc.next()) // 11
    console.log(inc.next()) // 12
    console.log(inc.next()) // 13

    var inc = new Increment({radix: 36})
    console.log(inc.next()) // "1"
    console.log(inc.next()) // "2"
    console.log(inc.next()) // "3"

    var inc = new Increment({start: 20, radix: 36})
    console.log(inc.next()) // "l"
    console.log(inc.next()) // "m"
    console.log(inc.next()) // "n"

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