1.1.2 • Published 5 years ago
babel-plugin-ramda-no-useless-merge v1.1.2
babel-plugin-ramda-no-useless-merge
Replaces
R.merge(a, b)
with{ ...a, ...b }
Installation
Using npm
npm install --save-dev babel-plugin-ramda-no-useless-merge
or using yarn
yarn add babel-plugin-ramda-no-useless-merge
Example
In
const c = R.merge(a, b);
Out
const c = { ...a, ...b };
Usage
Via .babelrc
{
"plugins": ["ramda-no-useless-merge"]
}
Via CLI
babel --plugins ramda-no-useless-merge script.js
Learn More
- Babel Plugin Handbook by @thejameskyle
- Using Babel to Codemod your Code by @kentcdodds
- Frontend Masters Course - Code Transformation and Linting with ASTs by @kentcdodds
- AST Explorer
License
MIT