# length-1

> First negative index through Array

Latest version **1.0.1** (published 2016-05-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install length-1
pnpm add length-1
yarn add length-1
bun add length-1
```

## 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 | 2016-05-25 |
| First published | 2016-05-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Andrea Giammarchi |
| Maintainers | webreflection |
| Keywords | Array, -1, index, length, negative |

## Links

- npm: https://www.npmjs.com/package/length-1
- Repository: https://github.com/WebReflection/length-1
- Homepage: https://github.com/WebReflection/length-1#readme
- Issues: https://github.com/WebReflection/length-1/issues
- npm.io page: https://npm.io/package/length-1

## Recent versions

- 1.0.1 (latest) — 2016-05-25
- 1.0.0 — 2016-05-25

## README

# length-1 [![build status](https://secure.travis-ci.org/WebReflection/length-1.svg)](http://travis-ci.org/WebReflection/length-1) [![npm version](https://badge.fury.io/js/length-1.svg)](https://badge.fury.io/js/length-1)
First negative index through Array

```js
var getLengthMinus1 = require('./length-1');

// Arrays fixed
var arr = [1, 2, 3];
arr[-1]; // 3

// reusable tested functionality
Object.defineProperty(
  NodeList.prototype,
  -1,
  {get: getLengthMinus1}
);
document.querySelectorAll('#menu li')[-1];
```

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