Update transform-object-assign's README from babel.github.io [skip ci] (#4929)
This commit is contained in:
committed by
Henry Zhu
parent
75720a3243
commit
fcc5b8963b
@@ -1,6 +1,6 @@
|
||||
# babel-plugin-transform-object-assign
|
||||
|
||||
Replace `Object.assign` with an inline helper.
|
||||
> Replace `Object.assign` with an inline helper. If you are authoring an application, rather than a library, it is recommended that you use the `Object.assign` polyfill instead.
|
||||
|
||||
## Example
|
||||
|
||||
@@ -18,6 +18,15 @@ var _extends = ...;
|
||||
_extends(a, b);
|
||||
```
|
||||
|
||||
## Caveats
|
||||
|
||||
- Will only work with code of the form `Object.assign` or `Object['assign']`. The following patterns are not supported:
|
||||
|
||||
```javascript
|
||||
var { assign } = Object;
|
||||
var assign = Object.assign;
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
|
||||
Reference in New Issue
Block a user