# @putout/plugin-remove-useless-map

> 🐊Putout plugin adds ability to remove useless `.map`

Latest version **3.0.1** (published 2026-02-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install @putout/plugin-remove-useless-map
pnpm add @putout/plugin-remove-useless-map
yarn add @putout/plugin-remove-useless-map
bun add @putout/plugin-remove-useless-map
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2026-02-13 |
| First published | 2021-07-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=22 |
| Dependencies | 0 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 796 |
| Author | coderaiser |
| Maintainers | coderaiser |
| Keywords | putout, putout-plugin, plugin, map, useless |

## Links

- npm: https://www.npmjs.com/package/@putout/plugin-remove-useless-map
- Repository: https://github.com/coderaiser/putout
- Homepage: https://github.com/coderaiser/putout/tree/master/packages/plugin-remove-useless-map#readme
- Issues: https://github.com/coderaiser/putout/issues
- npm.io page: https://npm.io/package/@putout/plugin-remove-useless-map

## Recent versions

- 3.0.1 (latest) — 2026-02-13
- 3.0.0 — 2026-02-04
- 2.0.0 — 2025-05-11
- 1.1.0 — 2021-08-17
- 1.0.0 — 2021-07-21

## README

# @putout/plugin-remove-useless-map [![NPM version][NPMIMGURL]][NPMURL]

[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-remove-useless-map.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/@putout/plugin-remove-useless-map "npm"

> The `map()` method creates a new array populated with the results of calling a provided function on every element in the calling array.
>
> (c) [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)

🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to remove useless `map()`.

## Install

```
npm i @putout/plugin-remove-useless-map
```

## Rule

```json
{
    "rules": {
        "remove-useless-map": "on"
    }
}
```

## ❌ Example of incorrect code

```js
const [str] = lines.map((line) => `hello ${line}`);

const x = array.map((a) => a);

Object
    .entries(a)
    .map(([a, b]) => [a, b]);
```

## ✅ Example of correct code

```js
const [line] = lines;
const str = `hello ${line}`;

const x = array;
```

## License

MIT

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