Contains polyfills needed for features added in ECMAScript 2017
npm install es8-polyfill* Polyfill to include the following ES8 features:
* Object.values
* Object.entries
* String.prototype.padStart
* String.prototype.padEnd
If you're interested in contributing, see the Contributing section below. Otherwise, install this package via npm: es8-polyfill.
To include all polyfills:
``js`
require('es8-polyfill');
To include only String polyfills:
`js`
require('es8-polyfill/lib/string');
To include only Object polyfills:
`js`
require('es8-polyfill/lib/object');
To access helper functions directly:
`js`
const { padEnd, padStart } = require('es8-polyfill/lib/helpers/string');
`js`
const { entries, values } = require('es8-polyfill/lib/helpers/object');
Ensure that Node, npm, and yarn are installed.
Then, install gulp globally:
``
npm install -g gulp
``
git clone https://github.com/brendenpalmer/es8-polyfill.git
Finally, install all development dependencies:
``
cd es8-polyfill
yarn
Run the default gulp task to run the linter, run unit tests, build documentation, and build the required scripts.
Look at the gulp folder to view the available tasks to run.
To build and serve the documentation run the following:
``
gulp serve:docs
1. Fork it!
2. Create your feature branch: git checkout -b my-new-featuregit commit -am 'Add some feature'
3. Commit your changes: git push origin my-new-feature`
4. Push to the branch:
5. Submit a pull request.
See the CHANGELOG.
Licensed under MIT. See the full license here: license.