@putout/operate
Advanced tools
Comparing version 8.11.0 to 8.12.0
@@ -25,2 +25,3 @@ 'use strict'; | ||
const {getExportDefault} = require('./get-export-default'); | ||
const {renameProperty} = require('./rename-property'); | ||
const { | ||
@@ -43,2 +44,3 @@ getProperty, | ||
module.exports.isSimple = isSimple; | ||
module.exports.renameProperty = renameProperty; | ||
@@ -45,0 +47,0 @@ function toExpression(el) { |
{ | ||
"name": "@putout/operate", | ||
"version": "8.11.0", | ||
"version": "8.12.0", | ||
"type": "commonjs", | ||
@@ -39,3 +39,3 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
"eslint": "^8.0.1", | ||
"eslint-plugin-n": "^15.2.4", | ||
"eslint-plugin-n": "^16.0.0", | ||
"eslint-plugin-putout": "^17.0.0", | ||
@@ -42,0 +42,0 @@ "just-camel-case": "^4.0.2", |
@@ -20,2 +20,22 @@ # Operate [![NPM version][NPMIMGURL]][NPMURL] [![Coverage Status][CoverageIMGURL]][CoverageURL] | ||
### `renameProperty` | ||
Let's suppose you have code | ||
```js | ||
const {hello: world} = one; | ||
``` | ||
You want to change to: | ||
```js | ||
const {world} = one; | ||
``` | ||
Use: | ||
```js | ||
renameProperty(path, 'hello', 'world'); | ||
``` | ||
### `isSimple(path | node)` | ||
@@ -22,0 +42,0 @@ |
18998
12
385
206