CityBEM-CityLayers-SaeedRay.../node_modules/core-js
2024-11-05 15:01:14 -05:00
..
es This commit pushes the node_modules folder separately due to its large size. 2024-11-05 15:01:14 -05:00
features This commit pushes the node_modules folder separately due to its large size. 2024-11-05 15:01:14 -05:00
internals This commit pushes the node_modules folder separately due to its large size. 2024-11-05 15:01:14 -05:00
modules This commit pushes the node_modules folder separately due to its large size. 2024-11-05 15:01:14 -05:00
proposals This commit pushes the node_modules folder separately due to its large size. 2024-11-05 15:01:14 -05:00
stable This commit pushes the node_modules folder separately due to its large size. 2024-11-05 15:01:14 -05:00
stage This commit pushes the node_modules folder separately due to its large size. 2024-11-05 15:01:14 -05:00
web This commit pushes the node_modules folder separately due to its large size. 2024-11-05 15:01:14 -05:00
configurator.js This commit pushes the node_modules folder separately due to its large size. 2024-11-05 15:01:14 -05:00
index.js This commit pushes the node_modules folder separately due to its large size. 2024-11-05 15:01:14 -05:00
LICENSE This commit pushes the node_modules folder separately due to its large size. 2024-11-05 15:01:14 -05:00
package.json This commit pushes the node_modules folder separately due to its large size. 2024-11-05 15:01:14 -05:00
postinstall.js This commit pushes the node_modules folder separately due to its large size. 2024-11-05 15:01:14 -05:00
README.md This commit pushes the node_modules folder separately due to its large size. 2024-11-05 15:01:14 -05:00

core-js

Open Collective version core-js downloads core-js-pure downloads tests eslint

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 if you are interested in core-js: Open Collective, Patreon, PayPal, Bitcoin ( bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz ).




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.