core-js-bundle

popular cjs
Standard library
Keywords
ES3ES5ES6ES7ES2015ES2016ES2017ES2018ES2019ES2020ES2021ES2022ES2023ES2024ECMAScript 3
INSTALL
Type:
Version:
- Static
- Latest Patch
- Latest Minor
- Latest Major
- 3.41.0
- 3.40.0
- 3.39.0
- 3.38.1
- 3.38.0
- 3.37.1
- 3.37.0
- 3.36.1
- 3.36.0
- 3.35.1
- 3.35.0
- 3.34.0
- 3.33.3
- 3.33.2
- 3.33.1
- 3.33.0
- 3.32.2
- 3.32.1
- 3.32.0
- 3.31.1
- 3.31.0
- 3.30.2
- 3.30.1
- 3.30.0
- 3.29.1
- 3.29.0
- 3.28.0
- 3.27.2
- 3.27.1
- 3.27.0
- 3.26.1
- 3.26.0
- 3.25.5
- 3.25.4
- 3.25.3
- 3.25.2
- 3.25.1
- 3.25.0
- 3.24.1
- 3.24.0
- 3.23.5
- 3.23.4
- 3.23.3
- 3.23.2
- 3.23.1
- 3.23.0
- 3.22.8
- 3.22.7
- 3.22.6
- 3.22.5
- 3.22.4
- 3.22.3
- 3.22.2
- 3.22.1
- 3.22.0
- 3.21.1
- 3.21.0
- 3.20.3
- 3.20.2
- 3.20.1
- 3.20.0
- 3.19.3
- 3.19.2
- 3.19.1
- 3.19.0
- 3.18.3
- 3.18.2
- 3.18.1
- 3.18.0
- 3.17.3
- 3.17.2
- 3.17.1
- 3.17.0
- 3.16.4
- 3.16.3
- 3.16.2
- 3.16.1
- 3.16.0
- 3.15.2
- 3.15.1
- 3.15.0
- 3.14.0
- 3.13.1
- 3.13.0
- 3.12.1
- 3.12.0
- 3.11.3
- 3.11.2
- 3.11.1
- 3.11.0
- 3.10.2
- 3.10.1
- 3.10.0
- 3.9.1
- 3.9.0
- 3.8.3
- 3.8.2
- 3.8.1
- 3.8.0
- 3.7.0
- 3.6.5
- 3.6.4
- 3.6.3
- 3.6.2
- 3.6.1
- 3.6.0
- 3.5.0
- 3.4.8
- 3.4.7
- 3.4.6
- 3.4.5
- 3.4.4
- 3.4.3
- 3.4.2
- 3.4.1
- 3.4.0
- 3.3.6
- 3.3.5
- 3.3.4
- 3.3.3
- 3.3.2
- 3.3.1
- 3.2.1
- 3.2.0
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.1
- 3.0.0
- 3.0.0-beta.20
- 3.0.0-beta.19
- 3.0.0-beta.18
- 3.0.0-beta.17
- 3.0.0-beta.16
- 3.0.0-beta.15
- 3.0.0-beta.14
- 3.0.0-beta.13
- 3.0.0-beta.12
- 3.0.0-beta.11
- 3.0.0-beta.10
- 3.0.0-beta.9
- 3.0.0-beta.8
- 3.0.0-beta.7
- 3.0.0-beta.6
- 3.0.0-beta.5
- 3.0.0-beta.4
- 3.0.0-beta.3
- 3.0.0-beta.2
- 3.0.0-beta.1
- 3.0.0-alpha.4
- 3.0.0-alpha.3
- 3.0.0-alpha.2
- 3.0.0-alpha.1
I highly recommend reading this: So, what's next?
Modular standard library for JavaScript. Includes polyfills for ECMAScript up to 2023: 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.
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 if you are interested in core-js
: Open Collective, Patreon, Boosty, Bitcoin ( bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz ), Alipay.
import 'core-js/actual';
Promise.resolve(42).then(it => console.log(it)); // => 42
Array.from(new Set([1, 2, 3]).union(new Set([3, 4, 5]))); // => [1, 2, 3, 4, 5]
[1, 2].flatMap(it => [it, it]); // => [1, 1, 2, 2]
(function * (i) { while (true) yield i++; })(1)
.drop(1).take(5)
.filter(it => it % 2)
.map(it => it ** 2)
.toArray(); // => [9, 25]
structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
You can load only required features:
import 'core-js/actual/promise';
import 'core-js/actual/set';
import 'core-js/actual/iterator';
import 'core-js/actual/array/from';
import 'core-js/actual/array/flat-map';
import 'core-js/actual/structured-clone';
Promise.resolve(42).then(it => console.log(it)); // => 42
Array.from(new Set([1, 2, 3]).union(new Set([3, 4, 5]))); // => [1, 2, 3, 4, 5]
[1, 2].flatMap(it => [it, it]); // => [1, 1, 2, 2]
(function * (i) { while (true) yield i++; })(1)
.drop(1).take(5)
.filter(it => it % 2)
.map(it => it ** 2)
.toArray(); // => [9, 25]
structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
Or use it without global namespace pollution:
import Promise from 'core-js-pure/actual/promise';
import Set from 'core-js-pure/actual/set';
import Iterator from 'core-js-pure/actual/iterator';
import from from 'core-js-pure/actual/array/from';
import flatMap from 'core-js-pure/actual/array/flat-map';
import structuredClone from 'core-js-pure/actual/structured-clone';
Promise.resolve(42).then(it => console.log(it)); // => 42
from(new Set([1, 2, 3]).union(new Set([3, 4, 5]))); // => [1, 2, 3, 4, 5]
flatMap([1, 2], it => [it, it]); // => [1, 1, 2, 2]
Iterator.from(function * (i) { while (true) yield i++; }(1))
.drop(1).take(5)
.filter(it => it % 2)
.map(it => it ** 2)
.toArray(); // => [9, 25]
structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
It's a bundled global version, for more info see core-js
documentation.