# Installation
> `npm install --save @types/negative-index`

# Summary
This package contains type definitions for negative-index (https://github.com/dy/negative-index#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/negative-index.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/negative-index/index.d.ts)
````ts
export = negativeIndex;

/**
 * Convert negative index to positive starting from the end. Same way
 * [Array.slice](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice)
 * arguments work.
 *
 * @example
 * import idx = require('negative-index');
 *
 * idx(-5, 8); // 3
 * idx(5, 8); // 5
 *
 * @example
 * // Works well for normalizing real numbers offset, like time etc:
 *
 * import normOffset = require('negative-index');
 *
 * const time = -.15, duration = 2.45;
 *
 * normOffset(time, duration); // 2.3
 */
declare function negativeIndex(index: number, length: number): number;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [BendingBender](https://github.com/BendingBender).
