diff --git a/doc/caveats.md b/doc/caveats.md index 356d0ea6ec..af8fb6b60f 100644 --- a/doc/caveats.md +++ b/doc/caveats.md @@ -1,19 +1,15 @@ # Caveats -## Async/Generators +In order for certain features to work they require certain polyfills. You can +satisfy **all** 6to5 feature requirements by using the included +[polyfill](polyfill.md). You may alternatively selectively include what you need: -The [regenerator runtime](https://github.com/facebook/regenerator/blob/master/runtime.js) -and an [ES6 polyfill](polyfill.md) are required in order for generators to work. - -### Async/Comprehensions - -[Experimental support](usage.md#experimental) must be enabled for these proposed -ES7 features to work. - -### Array comprehension/Array destructuring/Spread - -An [ES6 polyfill](polyfill.md) is required. More specifically a polyfill for -`Array.isArray` and `Array.from`. +| Feature | Requirements | +| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| Array destructuring | `Array.isArray`, `Array.from` | +| Async functions, Generators | [experimental option](usage.md#experimental), [regenerator runtime](https://github.com/facebook/regenerator/blob/master/runtime.js) | +| Comprehensions | [experimental option](usage.md#experimental), `Array.isArray`, `Array.from` | +| Spread | `Array.isArray`, `Array.from` | ## Classes diff --git a/doc/polyfill.md b/doc/polyfill.md index 6ae32ef7e4..619602e0e7 100644 --- a/doc/polyfill.md +++ b/doc/polyfill.md @@ -5,13 +5,18 @@ [es6-shim](https://github.com/paulmillr/es6-shim) and [es6-symbol](https://github.com/medikoo/es6-symbol) polyfills. -## Node +This will emulate a full ES6 environment. This polyfill is automatically loaded +when using [6to5-node](usage.md#node). + +## Usage + +### Node ```javascript require("6to5/polyfill"); ``` -## Browser +### Browser Available from the `browser-polyfill.js` file within the 6to5 directory of an npm release.