# index-store

> helper object for generating, validating, and recycling index values

Latest version **0.0.1** (published 2016-11-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install index-store
pnpm add index-store
yarn add index-store
bun add index-store
```

## 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 | 2016-11-01 |
| First published | 2016-11-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Eric Birkeland |
| Maintainers | hadhadhadhadabettereffect |

## Links

- npm: https://www.npmjs.com/package/index-store
- Repository: https://github.com/hadhadhadhadabettereffect/index-store
- Homepage: https://github.com/hadhadhadhadabettereffect/index-store#readme
- Issues: https://github.com/hadhadhadhadabettereffect/index-store/issues
- npm.io page: https://npm.io/package/index-store

## Recent versions

- 0.0.1 (latest) — 2016-11-01

## README

# Index Store
## usage
```javascript
var IndexStore = require("index-store");
var store = new IndexStore();
```

### methods
* getIndex
    - returns an unused index. If no valid values under max are available, returns -1
* setMax
    - sets max index value. default max is 1073741823
* isValid
    - returns true if supplied arg is an active index (a value returned by getIndex which has not been released)
* releaseIndex
    - marks returned index as free for reuse

### private properties
Property names starting with an underscore (_i, _key, _max) are meant to be private. There isn't anything keeping them from being read/written directly; the underscores are just meant to signify intended use.

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