diff --git a/doc/caveats.md b/doc/caveats.md index 08fc3196fc..32049b2f98 100644 --- a/doc/caveats.md +++ b/doc/caveats.md @@ -11,8 +11,8 @@ satisfy **all** 6to5 feature requirements by using the included | Async functions, Generators | [experimental](usage.md#experimental), [regenerator runtime](https://github.com/facebook/regenerator/blob/master/runtime.js) | | Comprehensions | [experimental](usage.md#experimental), `Array.isArray`, `Array.from` | | For Of | `Symbol`, `prototype[Symbol.iterator]` | -| Spread | `Array.isArray`, `Array.from` | | Object spread/rest | [experimental](usage.md#experimental), `Object.assign` | +| Spread | `Array.isArray`, `Array.from` | ## Classes diff --git a/doc/differences.md b/doc/differences.md index 0d853a6513..9b74ebddb1 100644 --- a/doc/differences.md +++ b/doc/differences.md @@ -84,12 +84,12 @@ better suited if you'd like a full ES6 environment with polyfills and all. | Generator comprehension | ✓ | ✓ | | | | | | Let scoping | ✓ | ✓ | ✓ | | | | | Modules | ✓ | ✓ | | | ✓ | | +| Object rest/spread | ✓ | | | | | ✓ | | Property method assignment | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | Property name shorthand | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | Rest parameters | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | Spread | ✓ | ✓ | ✓ | ✓ | ✓ | | | Template literals | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| Object rest/spread | ✓ | | | | | ✓ | | Unicode regex | ✓ | ✓ | ✓ | | | | ### [Traceur](https://github.com/google/traceur-compiler) diff --git a/doc/features.md b/doc/features.md index e503a2ab54..d23e891620 100644 --- a/doc/features.md +++ b/doc/features.md @@ -208,6 +208,13 @@ export default test; 0o767 === 503; // true ``` +## Object spread/rest ([experimental](usage.md#experimental)) ([spec](https://github.com/sebmarkbage/ecmascript-rest-spread)) + +```javascript +var n = { x, y, ...z }; +var { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 }; +``` + ## Property method assignment ```javascript @@ -261,14 +268,6 @@ var x = 5; var y = 10; console.log(`${x} + ${y} = ${x + y}`); // "5 + 10 = 15" ``` - -## Object spread/rest ([experimental](usage.md#experimental)) ([spec](https://github.com/sebmarkbage/ecmascript-rest-spread)) - -```javascript -var n = { x, y, ...z }; -var { x, y, ...z } = { x: 1, y: 2, a: 3, b: 4 }; -``` - ## Unicode regex ```javascript diff --git a/doc/index.md b/doc/index.md index e4a47ad72a..addb20edc9 100644 --- a/doc/index.md +++ b/doc/index.md @@ -47,11 +47,11 @@ And it doesn't end here! To see all the ways you can use 6to5, check out the - [Let scoping](features.md#let-scoping) - [Modules](features.md#modules) - [Numeric literals](features.md#numeric-literals) + - [Object Rest/Spread](features.md#object-rest-spread) ([experimental](usage.md#experimental)) - [Property method assignment](features.md#property-method-assignment) - [Property name shorthand](features.md#property-name-shorthand) - [React/JSX](react.md) - [Rest parameters](features.md#rest-parameters) - [Spread](features.md#spread) - [Template literals](features.md#template-literals) - - [Object Rest/Spread](features.md#object-rest-spread) ([experimental](usage.md#experimental)) - [Unicode regex](features.md#unicode-regex)