# babel-plugin-assume-first-argument

> Plugin simplifying arrow functions when working with the common case

Latest version **1.0.0** (published 2019-07-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-assume-first-argument
pnpm add babel-plugin-assume-first-argument
yarn add babel-plugin-assume-first-argument
bun add babel-plugin-assume-first-argument
```

## 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.0 |
| Published | 2019-07-12 |
| First published | 2019-07-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Richard van der Dys |
| Maintainers | dijs |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-assume-first-argument
- npm.io page: https://npm.io/package/babel-plugin-assume-first-argument

## Recent versions

- 1.0.0 (latest) — 2019-07-12

## README

# Assume First Argument

Babel plugin which reuses a uncommon unary operator for a more common purpose.

```js
['foo', 'bar'].map(~length); // => ['foo', 'bar'].map(uid => uid.length);
```

```js
[{ foo: 1 }, { foo: 2 }, { foo: 3 }].map(~foo % 2 === 0); // => ...map(uid => uid.foo % 2 === 0)
```

I initially wanted to use a better syntax, but realized that you can only write Babel plugins for Javascript syntax that they support. This may change in the future.

---
_Source: https://npm.io/package/babel-plugin-assume-first-argument · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
