# infinite-array

> Infinite array index using ES2015 Proxy

Latest version **1.1.0** (published 2018-02-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install infinite-array
pnpm add infinite-array
yarn add infinite-array
bun add infinite-array
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2018-02-12 |
| First published | 2017-12-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 0 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | xxhomey19 |
| Maintainers | xxhomey19 |
| Keywords | array, es2015, index, indice, infinite, proxies, proxy, reverse |

## Links

- npm: https://www.npmjs.com/package/infinite-array
- Repository: https://github.com/xxhomey19/infinite-array
- Homepage: https://github.com/xxhomey19/infinite-array#readme
- Issues: https://github.com/xxhomey19/infinite-array/issues
- npm.io page: https://npm.io/package/infinite-array

## Recent versions

- 1.1.0 (latest) — 2018-02-12
- 1.0.2 — 2017-12-10
- 1.0.1 — 2017-12-10
- 1.0.0 — 2017-12-10

## README

# infinite-array [![Build Status](https://travis-ci.org/xxhomey19/infinite-array.svg?branch=master)](https://travis-ci.org/xxhomey19/infinite-array)

Inspired by [sindresorhus/negative-array](https://github.com/sindresorhus/negative-array), `infinite-array` supports index which is negative, positive and even bigger than array's length.

**Support TypeScript recently.**

## Install

```
$ npm install infinite-array
```

## Usage

```js
import infiniteArray from 'infinite-array';

const nba = infiniteArray(['N', 'B', 'A']);

console.log(nba[-6]); // N
console.log(nba[-5]); // B
console.log(nba[-4]); // A
console.log(nba[-3]); // N
console.log(nba[-2]); // B
console.log(nba[-1]); // A
console.log(nba[0]); // N
console.log(nba[1]); // B
console.log(nba[2]); // A
console.log(nba[3]); // N
console.log(nba[4]); // B
console.log(nba[5]); // A
```

## License

MIT © [xxhomey19](https://github.com/xxhomey19)

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