# babel-plugin-ramda

> Ramda modularized builds without the hassle

Latest version **2.1.1** (published 2022-06-22) · WTFPL license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-ramda
pnpm add babel-plugin-ramda
yarn add babel-plugin-ramda
bun add babel-plugin-ramda
```

## 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 | 2.1.1 |
| Published | 2022-06-22 |
| First published | 2015-08-06 |
| Weekly downloads | 0 |
| License | WTFPL |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 312 |
| Author | Graeme Yeates |
| Maintainers | megawac |
| Keywords | ramda, modularize, babel-plugin |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-ramda
- Repository: https://github.com/megawac/babel-plugin-ramda
- Homepage: https://github.com/megawac/babel-plugin-ramda#readme
- Issues: https://github.com/megawac/babel-plugin-ramda/issues
- npm.io page: https://npm.io/package/babel-plugin-ramda

## Dependencies (1)

- [@babel/helper-module-imports](https://npm.io/package/@babel/helper-module-imports.md) ^7.0.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 2.1.1 (latest) — 2022-06-22
- 2.1.0 — 2022-06-14
- 2.0.0 — 2018-12-13
- 1.6.3 — 2018-08-23
- 1.6.2 — 2018-07-23
- 1.6.1 — 2018-04-11
- 1.6.0 — 2018-04-11
- 1.5.0 — 2018-03-06
- 1.4.3 — 2017-09-06
- 1.4.2 — 2017-09-06
- 1.4.1 — 2017-09-06
- 1.4.0 — 2017-09-05
- 1.3.0 — 2017-07-25
- 1.2.0 — 2017-03-10
- 1.1.9 — 2017-03-07
- … 13 more at https://npm.io/package/babel-plugin-ramda/versions

## README

babel-plugin-ramda [![Build Status](https://travis-ci.org/megawac/babel-plugin-ramda.svg?branch=master)](https://travis-ci.org/megawac/babel-plugin-ramda)
==============

This plugin is a transform to remove unused ramda dependencies, without forcing the user to cherry pick methods manually. This lets you use ramda naturally (aka as documented) without worrying about bundling parts you're not using.

See also [`babel-plugin-lodash`](https://github.com/megawac/babel-plugin-lodash).

#### Example

Converts

```js
import R, {map} from 'ramda';

map(R.add(1), [1, 2, 3]);
```

Roughly to 

```js
import add from 'ramda/src/add';
import map from 'ramda/src/map';

map(add(1), [1, 2, 3]);
```


#### Limitations

- You must be using ES6 imports (both specifiers and default work) to load ramda.

#### FAQ

> I receive `TypeError: The plugin "ramda" didn’t export a Plugin instance`<br>
> or, can I use this plugin with Babel v5?

Babel v5 is no longer supported. Use [v0.1.2](https://github.com/megawac/babel-plugin-ramda/releases/tag/v0.1.2) for support.

#### Usage

###### Via `.babelrc` (Recommended)

```json
{
  "plugins": ["ramda"]
}
```

or
```json
{
  "plugins": [
    ["ramda", {
      "useES": true
    }]
  ]
}
```

to use the new `ramda/es/` path for imports, which is available since Ramda 0.25. This is recommended as it uses ES modules rather than CommonJS. It defaults to `ramda/src/` when omitted.

###### Via CLI

```sh
$ babel --plugins ramda script.js
```

###### Via Node API

```javascript
require("babel-core").transform("code", {
  plugins: ["ramda"]
});
```

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