Repository
Current version released
3 years ago
Versions
- v3.39.0Latest
- v3.38.1
- v3.37.1
- v3.37.0
- v3.36.1
- v3.36.0
- v3.35.1
- v3.35.0
- v3.34.0
- v3.33.3
- v3.33.1
- v3.33.0
- v3.32.2
- v3.32.1
- v3.32.0
- v3.31.1
- v3.31.0
- v3.30.2
- v3.30.1
- v3.30.0
- v3.29.1
- v3.29.0
- v3.28.0
- v3.27.2
- v3.27.1
- v3.27.0
- v3.26.1
- v3.26.0
- v3.25.5
- v3.25.4
- v3.25.3
- v3.25.2
- v3.25.1
- v3.25.0
- v3.24.1
- v3.24.0
- v3.23.5
- v3.23.4
- v3.23.3
- v3.23.2
- v3.23.1
- v3.23.0
- v3.22.8
- v3.22.7
- v3.22.6
- v3.22.5
- v3.22.4
- v3.22.3
- v3.22.2
- v3.22.1
- v3.22.0
- v3.21.1
- v3.21.0
- v3.20.3
- v3.20.2
- v3.20.1
- v3.20.0
- v3.19.3
- v3.19.2
- v3.19.1
- v3.19.0
- v3.18.3
- v3.18.2
- v3.18.1
- v3.18.0
- v3.17.3
- v3.17.2
- v3.17.1
- v3.17.0
- v3.16.4
- v3.16.3
- v3.16.2
- v3.16.1
- v3.16.0
- v3.15.2-deno4
- v3.15.2-deno3
- v3.15.2-deno2
core-js-bundle
Modular standard library for JavaScript. Includes polyfills for ECMAScript up to 2021: 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
.
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 bundled global version, for more info see core-js
documentation.