core-js
Standard library
Last updated 3 months ago by zloirock .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install core-js 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 3.0.0-alpha.4                                ...           alpha (2 years ago)
  • 3.0.0-beta.20                                ...           beta (a year ago)
  • 3.6.4                                ...           latest (3 months ago)

175 Versions

  • 3.6.4                                ...           3 months ago
  • 3.6.3                                ...           3 months ago
  • 3.6.2                                ...           3 months ago
  • 3.6.1                                ...           3 months ago
  • 3.6.0                                ...           4 months ago
  • 3.5.0                                ...           4 months ago
  • 3.4.8                                ...           4 months ago
  • 2.6.11 [deprecated]           ...           4 months ago
  • 3.4.7                                ...           4 months ago
  • 3.4.6                                ...           4 months ago
  • 3.4.5                                ...           4 months ago
  • 3.4.4                                ...           4 months ago
  • 3.4.3                                ...           4 months ago
  • 3.4.2                                ...           4 months ago
  • 3.4.1                                ...           5 months ago
  • 3.4.0                                ...           5 months ago
  • 3.3.6                                ...           5 months ago
  • 3.3.5                                ...           5 months ago
  • 3.3.4                                ...           5 months ago
  • 3.3.3                                ...           5 months ago
  • 3.3.2                                ...           6 months ago
  • 3.3.1                                ...           6 months ago
  • 3.3.0                                ...           6 months ago
  • 2.6.10 [deprecated]           ...           6 months ago
  • 3.2.1                                ...           8 months ago
  • 3.2.0                                ...           8 months ago
  • 3.1.4                                ...           10 months ago
  • 3.1.3                                ...           10 months ago
  • 2.6.9 [deprecated]           ...           10 months ago
  • 3.1.2                                ...           10 months ago
  • 2.6.8 [deprecated]           ...           10 months ago
  • 3.1.1                                ...           10 months ago
  • 2.6.7 [deprecated]           ...           10 months ago
  • 3.1.0                                ...           10 months ago
  • 2.6.6 [deprecated]           ...           10 months ago
  • 3.0.1                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 3.0.0-beta.20                                ...           a year ago
  • 3.0.0-beta.19                                ...           a year ago
  • 3.0.0-beta.18                                ...           a year ago
  • 3.0.0-beta.17                                ...           a year ago
  • 3.0.0-beta.16                                ...           a year ago
  • 2.6.5 [deprecated]           ...           a year ago
  • 3.0.0-beta.15                                ...           a year ago
  • 2.6.4 [deprecated]           ...           a year ago
  • 3.0.0-beta.14                                ...           a year ago
  • 3.0.0-beta.13                                ...           a year ago
  • 3.0.0-beta.12                                ...           a year ago
  • 3.0.0-beta.11                                ...           a year ago
  • 2.6.3 [deprecated]           ...           a year ago
  • 3.0.0-beta.10                                ...           a year ago
  • 3.0.0-beta.9                                ...           a year ago
  • 3.0.0-beta.8                                ...           a year ago
  • 2.6.2 [deprecated]           ...           a year ago
  • 3.0.0-beta.7                                ...           a year ago
  • 3.0.0-beta.6                                ...           a year ago
  • 2.6.1 [deprecated]           ...           a year ago
  • 3.0.0-beta.5                                ...           a year ago
  • 2.6.0 [deprecated]           ...           a year ago
  • 3.0.0-beta.4                                ...           a year ago
  • 3.0.0-beta.3                                ...           2 years ago
  • 3.0.0-beta.2                                ...           2 years ago
  • 2.5.7 [deprecated]           ...           2 years ago
  • 3.0.0-beta.1                                ...           2 years ago
  • 2.5.6 [deprecated]           ...           2 years ago
  • 2.5.5 [deprecated]           ...           2 years ago
  • 3.0.0-alpha.4                                ...           2 years ago
  • 3.0.0-alpha.3                                ...           2 years ago
  • 3.0.0-alpha.2                                ...           2 years ago
  • 2.5.4 [deprecated]           ...           2 years ago
  • 3.0.0-alpha.1                                ...           2 years ago
  • 2.5.3 [deprecated]           ...           2 years ago
  • 2.5.2 [deprecated]           ...           2 years ago
  • 2.5.1 [deprecated]           ...           3 years ago
  • 2.5.0 [deprecated]           ...           3 years ago
  • 2.4.1 [deprecated]           ...           4 years ago
  • 1.2.7 [deprecated]           ...           4 years ago
  • 2.4.0 [deprecated]           ...           4 years ago
  • 2.3.0 [deprecated]           ...           4 years ago
  • 2.2.2 [deprecated]           ...           4 years ago
  • 2.2.1 [deprecated]           ...           4 years ago
  • 2.2.0 [deprecated]           ...           4 years ago
  • 2.1.5 [deprecated]           ...           4 years ago
  • 2.1.4 [deprecated]           ...           4 years ago
  • 2.1.3 [deprecated]           ...           4 years ago
  • 2.1.2 [deprecated]           ...           4 years ago
  • 2.1.1 [deprecated]           ...           4 years ago
  • 2.1.0 [deprecated]           ...           4 years ago
  • 2.0.3 [deprecated]           ...           4 years ago
  • 2.0.2 [deprecated]           ...           4 years ago
  • 2.0.1 [deprecated]           ...           4 years ago
  • 2.0.0 [deprecated]           ...           4 years ago
  • 2.0.0-beta.2                                ...           4 years ago
  • 2.0.0-beta                                ...           4 years ago
  • 2.0.0-alpha                                ...           4 years ago
  • 1.2.6 [deprecated]           ...           4 years ago
  • 1.2.5 [deprecated]           ...           4 years ago
  • 1.2.4 [deprecated]           ...           4 years ago
  • 1.2.3 [deprecated]           ...           4 years ago
  • 1.2.2 [deprecated]           ...           4 years ago
  • 1.2.1 [deprecated]           ...           5 years ago
  • 1.2.0 [deprecated]           ...           5 years ago
  • 1.1.4 [deprecated]           ...           5 years ago
  • 1.1.3 [deprecated]           ...           5 years ago
  • 1.1.2 [deprecated]           ...           5 years ago
  • 1.1.1 [deprecated]           ...           5 years ago
  • 1.1.0 [deprecated]           ...           5 years ago
  • 1.0.1 [deprecated]           ...           5 years ago
  • 1.0.0 [deprecated]           ...           5 years ago
  • 0.9.18 [deprecated]           ...           5 years ago
  • 0.9.17 [deprecated]           ...           5 years ago
  • 0.9.16 [deprecated]           ...           5 years ago
  • 0.9.15 [deprecated]           ...           5 years ago
  • 0.9.14 [deprecated]           ...           5 years ago
  • 0.9.13 [deprecated]           ...           5 years ago
  • 0.9.12 [deprecated]           ...           5 years ago
  • 0.9.11 [deprecated]           ...           5 years ago
  • 0.9.10 [deprecated]           ...           5 years ago
  • 0.9.9 [deprecated]           ...           5 years ago
  • 0.9.8 [deprecated]           ...           5 years ago
  • 0.9.7 [deprecated]           ...           5 years ago
  • 0.9.6 [deprecated]           ...           5 years ago
  • 0.9.5 [deprecated]           ...           5 years ago
  • 0.9.4 [deprecated]           ...           5 years ago
  • 0.9.3 [deprecated]           ...           5 years ago
  • 0.9.2 [deprecated]           ...           5 years ago
  • 0.9.1 [deprecated]           ...           5 years ago
  • 0.9.0 [deprecated]           ...           5 years ago
  • 0.8.4 [deprecated]           ...           5 years ago
  • 0.8.3 [deprecated]           ...           5 years ago
  • 0.8.2 [deprecated]           ...           5 years ago
  • 0.8.1 [deprecated]           ...           5 years ago
  • 0.8.0 [deprecated]           ...           5 years ago
  • 0.7.2 [deprecated]           ...           5 years ago
  • 0.7.1 [deprecated]           ...           5 years ago
  • 0.7.0 [deprecated]           ...           5 years ago
  • 0.6.1 [deprecated]           ...           5 years ago
  • 0.6.0 [deprecated]           ...           5 years ago
  • 0.5.4 [deprecated]           ...           5 years ago
  • 0.5.3 [deprecated]           ...           5 years ago
  • 0.5.2 [deprecated]           ...           5 years ago
  • 0.5.1 [deprecated]           ...           5 years ago
  • 0.5.0 [deprecated]           ...           5 years ago
  • 0.4.10 [deprecated]           ...           5 years ago
  • 0.4.9 [deprecated]           ...           5 years ago
  • 0.4.8 [deprecated]           ...           5 years ago
  • 0.4.7 [deprecated]           ...           5 years ago
  • 0.4.6 [deprecated]           ...           5 years ago
  • 0.4.5 [deprecated]           ...           5 years ago
  • 0.4.4 [deprecated]           ...           5 years ago
  • 0.4.3 [deprecated]           ...           5 years ago
  • 0.4.2 [deprecated]           ...           5 years ago
  • 0.4.1 [deprecated]           ...           5 years ago
  • 0.4.0 [deprecated]           ...           5 years ago
  • 0.3.3 [deprecated]           ...           5 years ago
  • 0.3.2 [deprecated]           ...           5 years ago
  • 0.3.1 [deprecated]           ...           5 years ago
  • 0.3.0 [deprecated]           ...           5 years ago
  • 0.2.5 [deprecated]           ...           5 years ago
  • 0.2.4 [deprecated]           ...           5 years ago
  • 0.2.3 [deprecated]           ...           5 years ago
  • 0.2.2 [deprecated]           ...           5 years ago
  • 0.2.1 [deprecated]           ...           5 years ago
  • 0.2.0 [deprecated]           ...           5 years ago
  • 0.1.5 [deprecated]           ...           5 years ago
  • 0.1.4 [deprecated]           ...           5 years ago
  • 0.1.3 [deprecated]           ...           5 years ago
  • 0.1.2 [deprecated]           ...           5 years ago
  • 0.1.1 [deprecated]           ...           5 years ago
  • 0.0.9 [deprecated]           ...           5 years ago
  • 0.0.8 [deprecated]           ...           6 years ago
  • 0.0.7 [deprecated]           ...           6 years ago
  • 0.0.5 [deprecated]           ...           6 years ago
  • 0.0.4 [deprecated]           ...           6 years ago
  • 0.0.3 [deprecated]           ...           6 years ago
Maintainers (1)
Downloads
Today 21,804
This Week 318,024
This Month 166,036
Last Day 72,075
Last Week 431,533
Last Month 1,837,950
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (22713)