Package Exports
- es6-shims/lib/shims/array
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (es6-shims) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ES6 shims

A collection of ES6 shims that use native implementations if available.
If you are looking for ES6 polyfills check out es6-polyfills.
List of shims
- Array
- Array.prototype.find
- Array.prototype.findIndex
Installation
Clone the sources and install the package (In the source directory) on command line using npm
:
npm install
Testing
Run the following NPM script to lint, test and check coverage of the code:
npm run check
Usage
Individual shims can be found inside the containing object's directory, e.g. lib/shims/array/
AMD
define(['es6-shims/lib/shims/array'], function(shim_array) {
// index === 1
var index = shim_array.find([1, 2, 3], function(element) {
return element === 2;
});
});
Browser globals
// index === 1
var index = es6_shim_array.find([1, 2, 3], function(element) {
return element === 2;
});
});
Node.js
var shim_array = require('es6-shims/lib/shims/array');
// index === 1
var index = shim_array.find([1, 2, 3], function(element) {
return element === 2;
});
License and copyright
Copyright (c) 2016-2017 University Of Helsinki (The National Library Of Finland)
This project's source code is licensed under the terms of GNU Lesser General Public License Version 3 or any later version.