reorder object spread/rest
This commit is contained in:
parent
49e7e3b998
commit
b97a2bd61d
@ -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) |
|
| 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` |
|
| Comprehensions | [experimental](usage.md#experimental), `Array.isArray`, `Array.from` |
|
||||||
| For Of | `Symbol`, `prototype[Symbol.iterator]` |
|
| For Of | `Symbol`, `prototype[Symbol.iterator]` |
|
||||||
| Spread | `Array.isArray`, `Array.from` |
|
|
||||||
| Object spread/rest | [experimental](usage.md#experimental), `Object.assign` |
|
| Object spread/rest | [experimental](usage.md#experimental), `Object.assign` |
|
||||||
|
| Spread | `Array.isArray`, `Array.from` |
|
||||||
|
|
||||||
## Classes
|
## Classes
|
||||||
|
|
||||||
|
|||||||
@ -84,12 +84,12 @@ better suited if you'd like a full ES6 environment with polyfills and all.
|
|||||||
| Generator comprehension | ✓ | ✓ | | | | |
|
| Generator comprehension | ✓ | ✓ | | | | |
|
||||||
| Let scoping | ✓ | ✓ | ✓ | | | |
|
| Let scoping | ✓ | ✓ | ✓ | | | |
|
||||||
| Modules | ✓ | ✓ | | | ✓ | |
|
| Modules | ✓ | ✓ | | | ✓ | |
|
||||||
|
| Object rest/spread | ✓ | | | | | ✓ |
|
||||||
| Property method assignment | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Property method assignment | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| Property name shorthand | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Property name shorthand | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| Rest parameters | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Rest parameters | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| Spread | ✓ | ✓ | ✓ | ✓ | ✓ | |
|
| Spread | ✓ | ✓ | ✓ | ✓ | ✓ | |
|
||||||
| Template literals | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
| Template literals | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
|
||||||
| Object rest/spread | ✓ | | | | | ✓ |
|
|
||||||
| Unicode regex | ✓ | ✓ | ✓ | | | |
|
| Unicode regex | ✓ | ✓ | ✓ | | | |
|
||||||
|
|
||||||
### [Traceur](https://github.com/google/traceur-compiler)
|
### [Traceur](https://github.com/google/traceur-compiler)
|
||||||
|
|||||||
@ -208,6 +208,13 @@ export default test;
|
|||||||
0o767 === 503; // true
|
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
|
## Property method assignment
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
@ -261,14 +268,6 @@ var x = 5;
|
|||||||
var y = 10;
|
var y = 10;
|
||||||
console.log(`${x} + ${y} = ${x + y}`); // "5 + 10 = 15"
|
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
|
## Unicode regex
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
|||||||
@ -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)
|
- [Let scoping](features.md#let-scoping)
|
||||||
- [Modules](features.md#modules)
|
- [Modules](features.md#modules)
|
||||||
- [Numeric literals](features.md#numeric-literals)
|
- [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 method assignment](features.md#property-method-assignment)
|
||||||
- [Property name shorthand](features.md#property-name-shorthand)
|
- [Property name shorthand](features.md#property-name-shorthand)
|
||||||
- [React/JSX](react.md)
|
- [React/JSX](react.md)
|
||||||
- [Rest parameters](features.md#rest-parameters)
|
- [Rest parameters](features.md#rest-parameters)
|
||||||
- [Spread](features.md#spread)
|
- [Spread](features.md#spread)
|
||||||
- [Template literals](features.md#template-literals)
|
- [Template literals](features.md#template-literals)
|
||||||
- [Object Rest/Spread](features.md#object-rest-spread) ([experimental](usage.md#experimental))
|
|
||||||
- [Unicode regex](features.md#unicode-regex)
|
- [Unicode regex](features.md#unicode-regex)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user