Big update!Announcing Socket for GitHub 1.0. Learn more
Socket
BlogLoveFAQ
Install
Log in

core-js-pure

Package Overview
Dependencies
0
Maintainers
1
Versions
118
Issues
File Explorer

Advanced tools

core-js-pure

Standard library

    3.24.1latest

Version published
Maintainers
1
Weekly downloads
13,829,856
decreased by-5.17%

Weekly downloads

Changelog

Source

3.24.1 - 2022.07.30

  • NodeJS is ignored in IS_BROWSER detection to avoid a false positive with jsdom, #1110
  • Fixed detection of @@species support in Promise in some old engines
  • { Array, %TypedArray% }.prototype.{ findLast, findLastIndex } marked as shipped in FF104
  • Added iOS Safari 15.6 compat data mapping
  • Fixed Opera 15 compat data mapping

Readme

Source

logo

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 -)

[email protected], 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, Bitcoin ( bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz ).




Example of usage:

import 'core-js/actual'; // <- at the top of your entry point Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] [1, 2, 3, 4, 5].group(it => it % 2); // => { 1: [1, 3, 5], 0: [2, 4] } Promise.resolve(42).then(x => console.log(x)); // => 42 structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3]) queueMicrotask(() => console.log('called as microtask'));

You can load only required features:

import 'core-js/actual/array/from'; // <- at the top of your entry point import 'core-js/actual/array/group'; // <- at the top of your entry point import 'core-js/actual/set'; // <- at the top of your entry point import 'core-js/actual/promise'; // <- at the top of your entry point import 'core-js/actual/structured-clone'; // <- at the top of your entry point import 'core-js/actual/queue-microtask'; // <- at the top of your entry point Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] [1, 2, 3, 4, 5].group(it => it % 2); // => { 1: [1, 3, 5], 0: [2, 4] } Promise.resolve(42).then(x => console.log(x)); // => 42 structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3]) queueMicrotask(() => console.log('called as microtask'));

Or use it without global namespace pollution:

import from from 'core-js-pure/actual/array/from'; import group from 'core-js-pure/actual/array/group'; import Set from 'core-js-pure/actual/set'; import Promise from 'core-js-pure/actual/promise'; import structuredClone from 'core-js-pure/actual/structured-clone'; import queueMicrotask from 'core-js-pure/actual/queue-microtask'; from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] group([1, 2, 3, 4, 5], it => it % 2); // => { 1: [1, 3, 5], 0: [2, 4] } Promise.resolve(42).then(x => console.log(x)); // => 42 structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3]) queueMicrotask(() => console.log('called as microtask'));

It's a version without global namespace pollution (the third example), for more info see core-js documentation.

Keywords

FAQs

What is core-js-pure?

Standard library

Is core-js-pure popular?

The npm package core-js-pure receives a total of 11,030,246 weekly downloads. As such, core-js-pure popularity was classified as popular.

Is core-js-pure well maintained?

We found that core-js-pure demonstrated a healthy version release cadence and project activity. It has 1 open source maintainer collaborating on the project.

Last updated on 29 Jul 2022
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc