Merge branch 'master' into 7.0

This commit is contained in:
Henry Zhu
2017-02-09 18:36:02 -05:00
119 changed files with 1095 additions and 340 deletions

View File

@@ -2,6 +2,40 @@
> Compile ES2015 spread to ES5
## Example
**In**
```js
var a = ['a', 'b', 'c'];
var b = [...a, 'foo'];
var c = { foo: 'bar', baz: 42 };
var d = {...o, a: 2};
```
**Out**
```js
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
}
var a = [ 'a', 'b', 'c' ];
var b = [].concat(a, [ 'foo' ]);
var c = { foo: 'bar', baz: 42 };
var d = _extends({}, o, { a: 2 });
```
## Installation
```sh
@@ -46,4 +80,8 @@ require("babel-core").transform("code", {
## Options
* `loose` - All iterables are assumed to be arrays.
### `loose`
`boolean`, defaults to `false`.
In loose mode, **all** iterables are assumed to be arrays.