Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 17:32

    zloirock on v3.15.0


  • 17:31

    zloirock on master

    3.15.0 (compare)

  • 11:36

    zloirock on master

    fix a typo (compare)

  • 11:28

    zloirock on master

    fix dotAll entry (compare)

  • 11:19

    zloirock on master

    add links to PRs (compare)

  • 09:43
    zloirock closed #521
  • 09:43

    zloirock on re


  • 09:43
    zloirock closed #792
  • 09:43

    zloirock on master

    add `.dotAll` support add basic NCG support untangle `fix-regexp-well-known… and 11 more (compare)

  • 09:43
    zloirock closed #944
  • 09:31
    zloirock synchronize #944
  • 09:31

    zloirock on re

    add `.dotAll` support add basic NCG support untangle `fix-regexp-well-known… and 10 more (compare)

  • 09:24
    zloirock closed #336
  • 09:24

    zloirock on master

    add missed annex-b methods add entries add some tests and 8 more (compare)

  • 09:24

    zloirock on annex-b


  • 09:24
    zloirock closed #945
  • 09:15
    radxene starred zloirock/core-js
  • 08:47
    romankhadka starred zloirock/core-js
  • 02:38
    jy0529 starred zloirock/core-js
Denis Pushkarev
@saulhardman sorry for delayed reply. At this moment, NodeList#forEach is not polyfilled in core-js, most likely it will be added soon, related issues - #329 and babel/babel#6091.
edge cannot find core-js/library/modules/es6.object.to-string.js?
Denis Pushkarev
@hei-yu-fa It's a cap for the library version, so it's just an empty file. As you can see, it exists. I don't know how you loading it, so I can't help.
Saul Hardman
@zloirock thank you very much for the response, I'll keep an eye on the issue.
-const apply = require('core-js/library/fn/reflect/apply');
-const construct = require('core-js/library/fn/reflect/construct');
+let apply, construct;
+if (typeof Reflect !== "undefined") {
+       apply = Reflect.apply;
+       construct = Reflect.construct;
+} else {
+       const fApply = Function.apply;
+       const bind = Function.bind;
+       apply = function(target, thisArgument, argumentsList) {
+               return fApply.call(target, thisArgument, argumentsList);
+       };
+       construct = function(target, argumentsList /*, newTarget */) {
+               switch (argumentsList.length) {
+                       case 0: return new target();
+                       case 1: return new target(argumentsList[0]);
+                       case 2: return new target(argumentsList[0], argumentsList[1]);
+                       case 3: return new target(argumentsList[0], argumentsList[1], argumentsList[2]);
+                       case 4: return new target(argumentsList[0], argumentsList[1], argumentsList[2], argumentsList[3]);
+               }
+               let $args = [null];
+               $args.push.apply($args, argumentsList);
+               return new (bind.apply(target, $args))();
+       };
^^ Applying this diff saves my final (minified) bundled size 8KB.... Tell me how to avoid excising core.js
Can I only import needed modules through script tag ?
Denis Pushkarev
@lili21 core-js use CommonJS, browsers does not support CommonJS natively, so you should bundle it before usage in script tag .
@daurnimator those entry points includes not only polyfills for Reflect.apply and Reflect.construct, they includes also all dependencies - for example, Function#bind polyfill. If you think that something included to your bundle is not required - feel free add a PR or open an issue.
im getting a length exception on an array but in chrome its fine, I only see the problem in IE. Im using Angular 4 with the cli i have all the polyfills uncommented wondering if this is a polyfill related problem and that im missing something or not im using core-js 2.5.1
hey guys
can someone ELI5 what core-js is, or what a JS standard library is? thanks
Denis Pushkarev
@csergiu core-js is JS standard library polyfill by the latest ECMAScript spec and actual proposals. What is a standard library? https://en.wikipedia.org/wiki/Standard_library
@imgregduh please, tell us a little more info. A reproducible example or at least the error message could be useful.
is there a library that checks if a feature is available
or even better one that tells me what to polyfill with which corejs module
Denis Pushkarev
@plexigras babel-preset-env with useBuiltins option automatically injects required core-js features, if you mean that.
Ilya Kantor
@zloirock trying to pm you
@zloirock i mean something like hasMap = () => tyepof Map === 'function' but instead of just for map for everything
Andrea Giammarchi
Screen Shot 2018-07-03 at 12.22.09.png
anyone experiencing the same in IE8? patched timers break with ease through setTimeout(alert, 1000, Math.random()) or anything, really
source: https://unpkg.com/core-js-bundle right away (that also should probably have a browser field that points at the already minified, stable/beta version)
is there something that tells me that 'features/array/fill' polyfills Array.fill
Is there a polyfill for Element.prototype.remove? I didn’t see one.
Kyle Warren
is there any way to force core-js to polyfill Promise in Chrome? i can't seem to get unhandledrejection to work in different environments, and it seems like Chrome is super strict about making this event is available only when a ton of obscure security conditions are met.
Andrea Giammarchi
@jacobg FYI most modern DOM methods are in dom4 https://github.com/WebReflection/dom4#dom4
Markus Günther


thanks for creating the package. I am actually updating from version 2.4.1 to the latest version. But with version 3 I get errors.
With version 2.6.5 everything works fine... do you have a upgrade guide.

ERROR in ./polyfills.js
Module not found: Error: Can't resolve 'core-js/es6/math' in '/Users/markusgunther/Development/neos-lucern/Packages/Application/Neos.Neos.Ui'
 @ ./polyfills.js 7:0-27
 @ multi ./polyfills.js ./packages/neos-ui-ckeditor-bindings/src/index.js

ERROR in ./node_modules/recharts/es6/polyfill.js
Module not found: Error: Can't resolve 'core-js/es6/math' in '/Users/markusgunther/Development/neos-lucern/Packages/Application/Neos.Neos.Ui/node_modules/recharts/es6'
 @ ./node_modules/recharts/es6/polyfill.js 1:0-26
 @ ./node_modules/recharts/es6/index.js
 @ ./packages/neos-ui-views/src/Data/TimeSeriesView/index.js
 @ ./packages/neos-ui-views/src/manifest.js
 @ ./packages/neos-ui/src/index.js
 @ multi ./packages/neos-ui/src/index.js

ERROR in ./polyfills.js
Module not found: Error: Can't resolve 'core-js/es6/symbol' in '/Users/markusgunther/Development/neos-lucern/Packages/Application/Neos.Neos.Ui'
 @ ./polyfills.js 9:0-29
 @ multi ./polyfills.js ./packages/neos-ui-ckeditor-bindings/src/index.js

ERROR in ./node_modules/react-keydown/es/lib/keys.js
Module not found: Error: Can't resolve 'core-js/es6/symbol' in '/Users/markusgunther/Development/neos-lucern/Packages/Application/Neos.Neos.Ui/node_modules/react-keydown/es/lib'
 @ ./node_modules/react-keydown/es/lib/keys.js 1:0-28
 @ ./node_modules/react-keydown/es/index.js
 @ ./packages/react-ui-components/src/SelectBox/index.js
 @ ./packages/neos-ui-ckeditor5-bindings/src/EditorToolbar/StyleSelect.js
 @ ./packages/neos-ui-ckeditor5-bindings/src/manifest.richtextToolbar.js
 @ ./packages/neos-ui-ckeditor5-bindings/src/manifest.js
 @ ./packages/neos-ui/src/index.js
 @ multi ./packages/neos-ui/src/index.js
import "core-js/es6"; does not help by the way
Denis Pushkarev
@markusguenther see https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md. For almost all cases is enough to replace core-js/es6/something to core-js/es/something.
Markus Günther
Thanks Denis, I will try it :)
ONAM Exchange
Hey Guys, i keep getting this issues. New to Nuxt/Vue

Compiled successfully in 2.78s

ERROR Failed to compile with 32 errors friendly-errors 06:07:13

These dependencies were not found: friendly-errors 06:07:13
friendly-errors 06:07:13

  • core-js/modules/es6.array.find in ./.nuxt/client.js friendly-errors 06:07:13
  • core-js/modules/es6.array.iterator in ./.nuxt/client.js, ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./.nuxt/components/nuxt-error.vue?vue&type=script&lang=js&
  • core-js/modules/es6.date.to-string in ./.nuxt/utils.js friendly-errors 06:07:13
  • core-js/modules/es6.function.name in ./.nuxt/client.js friendly-errors 06:07:13
  • core-js/modules/es6.object.assign in ./.nuxt/client.js, ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./.nuxt/components/nuxt-error.vue?vue&type=script&lang=js&
  • core-js/modules/es6.object.keys in ./.nuxt/utils.js friendly-errors 06:07:13
  • core-js/modules/es6.object.to-string in ./.nuxt/client.js friendly-errors 06:07:13
  • core-js/modules/es6.promise in ./.nuxt/client.js, ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./.nuxt/components/nuxt-error.vue?vue&type=script&lang=js&
  • core-js/modules/es6.regexp.constructor in ./.nuxt/utils.js friendly-errors 06:07:13
  • core-js/modules/es6.regexp.match in ./.nuxt/client.js friendly-errors 06:07:13
  • core-js/modules/es6.regexp.replace in ./.nuxt/utils.js friendly-errors 06:07:13
  • core-js/modules/es6.regexp.search in ./.nuxt/utils.js friendly-errors 06:07:13
  • core-js/modules/es6.regexp.split in ./.nuxt/utils.js friendly-errors 06:07:13
  • core-js/modules/es6.regexp.to-string in ./.nuxt/utils.js friendly-errors 06:07:13
  • core-js/modules/es6.string.includes in ./.nuxt/client.js, ./.nuxt/components/nuxt-link.client.js friendly-errors 06:07:13
  • core-js/modules/es6.string.iterator in ./.nuxt/utils.js friendly-errors 06:07:13
  • core-js/modules/es6.string.repeat in ./.nuxt/utils.js friendly-errors 06:07:13
  • core-js/modules/es6.string.starts-with in ./.nuxt/utils.js friendly-errors 06:07:13
  • core-js/modules/es6.symbol in ./.nuxt/client.js, ./.nuxt/components/nuxt-link.client.js friendly-errors 06:07:13
  • core-js/modules/es7.array.includes in ./.nuxt/client.js, ./.nuxt/components/nuxt-link.client.js friendly-errors 06:07:13
  • core-js/modules/es7.promise.finally in ./.nuxt/client.js, ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./.nuxt/components/nuxt-error.vue?vue&type=script&lang=js&
  • core-js/modules/es7.symbol.async-iterator in ./.nuxt/client.js, ./.nuxt/components/nuxt-link.client.js
  • core-js/modules/web.dom.iterable in ./.nuxt/client.js, ./.nuxt/components/nuxt-link.client.js friendly-errors 06:07:13
                                                                                                     friendly-errors 06:07:13
    To install them, you can run: npm install --save core-js/modules/es6.array.find core-js/modules/es6.array.iterator core-js/modules/es6.date.to-string core-js/modules/es6.function.name core-js/modules/es6.object.assign core-js/modules/es6.object.keys core-js/modules/es6.object.to-string core-js/modu
Denis Pushkarev
@OnamOfficial see nuxt/nuxt.js#5313
Seems in nuxt was missed direct setting of core-js@2 dependency.
Dimitar Danailov


I can't find document related with those errors:

Module not found: Error: Can't resolve 'core-js/fn/weak-map'
Module not found: Error: Can't resolve 'core-js/fn/promise'

My project uses babel7 and webpack 4.

The entry point uses:

import "core-js/stable"

Babel configuration:

  "plugins": [
    ["@babel/transform-runtime", {
      "corejs": 3,
  "presets": [
        "targets": {
          "node": "10.16"
        "corejs": "3",
        "useBuiltIns": "entry"
Denis Pushkarev
  • You should use corejs option only in one place - in @babel/preset-env or in @babel/transform-runtime.
  • Seems you or one of your dependencies use obsolete core-js@2 somewhere without explicit adding of this dependency.
@dimitardanailov ^
Robert Concepcion III
hi guys. Any chance to get latest commit into an NPM release? It seems can't use Git URLs as dependencies with Lerna on package.json yet, and the Promise polyfill missing that was patched recently even breaks Edge 😕
Denis Pushkarev
What do you mean?
Krikor Krikorian
Hi there! I need to know why I'm using core-js@3.4.1 and adding to webpack entrypoint vendors: 'core-js/fn/map' it works, in your docs I should change it for 'core-js/features/map', but with 'core-js/fn/map' it still works, why ?
Tamas Eppel

hello! I have moved my project from core-js 2 to core-js 3, and now I receive the following error
Module not found: Error: Can't resolve 'core-js/modules/web.dom.iterable'

my imports are

import 'core-js'
import 'core-js/modules/web.dom-collections.iterator'
import 'regenerator-runtime/runtime'
Aleksandr Yakunichev

Hi, everybody (and @zloirock :)) ) ! We're actively using core-js library (for which we're very grateful!), but, unfortunately, experiencing some issues, when a lot of versions are loaded on the same page (see image #2). We cannot influence this behaviour (cause it's not our platform and we do not have any permissions for that).

The main issue is that sometimes, when js code is loaded async with webpack a weird error occurs , saying cannot read property call of undefined (see image #1).

How can this issue be fixed and what is the core error? We will appreciate your help a lot, thanks!

Screenshot 2020-01-22 at 14.07.34.png

Hi, everybody :) I have been trying to run a library with rollup, babel and corejs to have capable of IE11. As my knowledge, '@babel/preset-env' and corejs@3 could have worked for. Finally, I nearly gonna get successful as seeing lots of messages:
core-js/modules/es.string.starts-with (imported by..
However, there was none of polyfills String.prototype... going out :(
"dependencies": {
"core-js": "^3.6.5",
{targets: {ie: '11'}, useBuiltIns: 'usage', corejs: 3}

any hints for getting through this? Is there hidden reason bypass core-js?

(!) Unresolved dependencies
core-js/modules/es.string.starts-with (imported by ..\test.js)
Francis Ivan
i have error
anyone. active here
Miguel Bonansea
module not found can't resolve 'core-js/stable'