# @writetome51/array-get-indexes-basic

> array-handling functions that return indexes of items in the array

Latest version **1.0.7** (published 2018-12-06) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @writetome51/array-get-indexes-basic
pnpm add @writetome51/array-get-indexes-basic
yarn add @writetome51/array-get-indexes-basic
bun add @writetome51/array-get-indexes-basic
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2018-12-06 |
| First published | 2018-09-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 26.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Steve Thompson |
| Maintainers | writetome51 |
| Keywords | array, search, get, find, index, indexes, data |

## Links

- npm: https://www.npmjs.com/package/@writetome51/array-get-indexes-basic
- Repository: https://github.com/writetome51/array-get-indexes-basic
- Homepage: https://github.com/writetome51/array-get-indexes-basic#readme
- Issues: https://github.com/writetome51/array-get-indexes-basic/issues
- npm.io page: https://npm.io/package/@writetome51/array-get-indexes-basic

## Dependencies (5)

- [basic-data-handling](https://npm.io/package/basic-data-handling.md) ~1.0.13
- [@writetome51/arrays-match](https://npm.io/package/@writetome51/arrays-match.md) ~1.0.3
- [error-if-not-populated-array](https://npm.io/package/error-if-not-populated-array.md) ~1.0.0
- [error-if-values-are-not-arrays](https://npm.io/package/error-if-values-are-not-arrays.md) ~1.0.2
- [error-if-not-primitive-or-array](https://npm.io/package/error-if-not-primitive-or-array.md) ~1.0.1

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 1.0.7 (latest) — 2018-12-06
- 1.0.6 — 2018-10-21
- 1.0.5 — 2018-10-10
- 1.0.4 — 2018-10-09
- 1.0.3 — 2018-10-07
- 1.0.2 — 2018-10-07
- 1.0.1 — 2018-10-04
- 1.0.0 — 2018-09-26

## README

These are array-handling functions that return indexes of items in the array.


value: anything except an object .  Returns -1 if value not found.

getFirstIndexOf(value, array); // returns integer


Type-checking version of Array.indexOf().  Change the startingPosition to get something other
than the first index of primitive.  startingPosition can also be negative to search from the end.

getIndexOfPrimitive(primitive, array, startingPosition = 0) // returns -1 if not found


If primitive isn't found, this returns empty array

getIndexesOfPrimitive(primitive, array) // returns array of integers


If arrayToSearchFor is found in arrayToSearchInside, this returns the index of the first found instance.

getFirstIndexOfArray(arrayToSearchFor, arrayToSearchInside); // returns -1 if not found


if arrayToSearchFor isn't found, this returns empty array

getIndexesOfArray(arrayToSearchFor, arrayToSearchInside); // returns array of integers

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