es8-polyfill
v0.1.0
Published
Contains polyfills needed for features added in ECMAScript 2017
Downloads
72
Maintainers
Readme
ES8 Polyfill
- Polyfill to include the following ES8 features:
- Object.values
- Object.entries
- String.prototype.padStart
- String.prototype.padEnd
Usage
If you're interested in contributing, see the Contributing section below. Otherwise, install this package via npm: es8-polyfill.
To include all polyfills:
require('es8-polyfill');
To include only String polyfills:
require('es8-polyfill/lib/string');
To include only Object polyfills:
require('es8-polyfill/lib/object');
To access helper functions directly:
const { padEnd, padStart } = require('es8-polyfill/lib/helpers/string');
const { entries, values } = require('es8-polyfill/lib/helpers/object');
Installation
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.
Documentation
To build and serve the documentation run the following:
gulp serve:docs
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request.
History
See the CHANGELOG.
License
Licensed under MIT. See the full license here: license.