# @arr/map

> A tiny, faster alternative to native Array.prototype.map

Latest version **1.0.1** (published 2019-10-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install @arr/map
pnpm add @arr/map
yarn add @arr/map
bun add @arr/map
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-10-23 |
| First published | 2017-07-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=4 |
| Dependencies | 0 |
| Unpacked size | 2.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 259 |
| Author | Luke Edwards |
| Maintainers | lukeed |
| Keywords | arr, array, Array.map, Array.prototype.map, performance, native, map |

## Links

- npm: https://www.npmjs.com/package/@arr/map
- Repository: https://github.com/lukeed/arr
- Homepage: https://github.com/lukeed/arr#readme
- Issues: https://github.com/lukeed/arr/issues
- npm.io page: https://npm.io/package/@arr/map

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-10-23
- 1.0.0 — 2017-07-13
- 0.2.0 — 2017-07-13
- 0.1.0 — 2017-07-09

## README

# @arr/map

> A tiny, faster alternative to native `Array.prototype.map`

:warning: Unlike native, `@arr/map` does _not_ support the optional `thisArg` parameter!

:warning: Unlike native, `@arr/map` does _not_ respect [Array holes](http://2ality.com/2015/09/holes-arrays-es6.html) -- you probably never needed this... :thinking:

## Install

```
$ npm install --save @arr/map
```

## Usage

```js
import map from '@arr/map';

const nums = [1, 5, 10, 15];
const doubles = map(nums, x => x * 2);
//=> doubles is: [2, 10, 20, 30]
//=> numbers is: [1, 5, 10, 15]
```

## API

### map(arr, callback)

#### arr
Type: `Array`<br>
The array to iterate upon.

#### callback(value[, index, array])
Type: `Function`<br>
Function to test for each element, taking three arguments:

* **value** (required) -- The current element being processed in the array.
* **index** (optional) -- The index of the current element being processed in the array.
* **array** (optional) -- The array `map` was called upon.


## License

MIT © [Luke Edwards](http://lukeed.com)

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