debian-mirror-gitlab/core-js
2019-12-21 20:55:43 +05:30
..
es New upstream version 12.4.6 2019-12-21 20:55:43 +05:30
features New upstream version 12.4.6 2019-12-21 20:55:43 +05:30
internals New upstream version 12.4.6 2019-12-21 20:55:43 +05:30
modules New upstream version 12.4.6 2019-12-21 20:55:43 +05:30
proposals New upstream version 12.3.9 2019-12-20 00:11:08 +05:30
stable New upstream version 12.4.6 2019-12-21 20:55:43 +05:30
stage New upstream version 12.3.9 2019-12-20 00:11:08 +05:30
web New upstream version 12.3.8 2019-12-04 20:38:33 +05:30
configurator.js New upstream version 12.2.9 2019-10-31 01:37:42 +05:30
index.js New upstream version 12.3.8 2019-12-04 20:38:33 +05:30
LICENSE New upstream version 12.0.9 2019-09-25 13:30:05 +05:30
package.json New upstream version 12.4.6 2019-12-21 20:55:43 +05:30
postinstall.js New upstream version 12.3.8 2019-12-04 20:38:33 +05:30
README.md New upstream version 12.0.9 2019-09-25 13:30:05 +05:30

core-js

Sponsors on Open Collective Backers on Open Collective Gitter version npm downloads Build Status devDependency status

Modular standard library for JavaScript. Includes polyfills for ECMAScript up to 2019: promises, symbols, collections, iterators, typed arrays, many other features, ECMAScript proposals, some cross-platform WHATWG / W3C features and proposals like URL. You can load only required features or use it without global namespace pollution.

As advertising: the author is looking for a good job -)

core-js@3, babel and a look into the future

Raising funds

core-js isn't backed by a company, so the future of this project depends on you. Become a sponsor or a backer on Open Collective or on Patreon if you are interested in core-js.




Example:

import 'core-js'; // <- at the top of your entry point

Array.from(new Set([1, 2, 3, 2, 1]));          // => [1, 2, 3]
[1, [2, 3], [4, [5]]].flat(2);                 // => [1, 2, 3, 4, 5]
Promise.resolve(32).then(x => console.log(x)); // => 32

You can load only required features:

import 'core-js/features/array/from'; // <- at the top of your entry point
import 'core-js/features/array/flat'; // <- at the top of your entry point
import 'core-js/features/set';        // <- at the top of your entry point
import 'core-js/features/promise';    // <- at the top of your entry point

Array.from(new Set([1, 2, 3, 2, 1]));          // => [1, 2, 3]
[1, [2, 3], [4, [5]]].flat(2);                 // => [1, 2, 3, 4, 5]
Promise.resolve(32).then(x => console.log(x)); // => 32

Or use it without global namespace pollution:

import from from 'core-js-pure/features/array/from';
import flat from 'core-js-pure/features/array/flat';
import Set from 'core-js-pure/features/set';
import Promise from 'core-js-pure/features/promise';

from(new Set([1, 2, 3, 2, 1]));                // => [1, 2, 3]
flat([1, [2, 3], [4, [5]]], 2);                // => [1, 2, 3, 4, 5]
Promise.resolve(32).then(x => console.log(x)); // => 32

It's a global version (first 2 examples), for more info see core-js documentation.