core-js 3.0.0-beta.6 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +19 -1
- package/es/array/flat-map.js +4 -0
- package/es/array/flat.js +4 -0
- package/es/array/index.js +21 -17
- package/es/array/virtual/flat-map.js +4 -0
- package/es/array/virtual/flat.js +4 -0
- package/es/array/virtual/index.js +7 -2
- package/es/index.js +8 -0
- package/es/instance/bind.js +7 -0
- package/es/instance/code-point-at.js +8 -0
- package/es/instance/concat.js +7 -0
- package/es/instance/copy-within.js +7 -0
- package/es/instance/ends-with.js +8 -0
- package/es/instance/entries.js +7 -0
- package/es/instance/every.js +7 -0
- package/es/instance/fill.js +7 -0
- package/es/instance/filter.js +7 -0
- package/es/instance/find-index.js +7 -0
- package/es/instance/find.js +7 -0
- package/es/instance/flags.js +6 -0
- package/es/instance/flat-map.js +7 -0
- package/es/instance/flat.js +7 -0
- package/es/instance/for-each.js +7 -0
- package/es/instance/includes.js +12 -0
- package/es/instance/index-of.js +7 -0
- package/es/instance/keys.js +7 -0
- package/es/instance/last-index-of.js +7 -0
- package/es/instance/map.js +7 -0
- package/es/instance/pad-end.js +8 -0
- package/es/instance/pad-start.js +8 -0
- package/es/instance/reduce-right.js +7 -0
- package/es/instance/reduce.js +7 -0
- package/es/instance/repeat.js +8 -0
- package/es/instance/reverse.js +7 -0
- package/es/instance/slice.js +7 -0
- package/es/instance/some.js +7 -0
- package/es/instance/sort.js +7 -0
- package/es/instance/splice.js +7 -0
- package/es/instance/starts-with.js +8 -0
- package/es/instance/trim-end.js +8 -0
- package/es/instance/trim-left.js +8 -0
- package/es/instance/trim-right.js +8 -0
- package/es/instance/trim-start.js +8 -0
- package/es/instance/trim.js +8 -0
- package/es/instance/values.js +7 -0
- package/es/object/from-entries.js +4 -0
- package/es/object/index.js +1 -0
- package/es/string/index.js +2 -0
- package/es/string/trim-end.js +3 -0
- package/es/string/trim-left.js +3 -0
- package/es/string/trim-right.js +3 -0
- package/es/string/trim-start.js +3 -0
- package/es/string/virtual/index.js +2 -0
- package/es/string/virtual/trim-end.js +3 -0
- package/es/string/virtual/trim-left.js +3 -0
- package/es/string/virtual/trim-right.js +3 -0
- package/es/string/virtual/trim-start.js +3 -0
- package/features/aggregate-error.js +5 -0
- package/features/array/flat-map.js +1 -3
- package/features/array/flat.js +1 -3
- package/features/array/index.js +0 -2
- package/features/array/virtual/flat-map.js +1 -3
- package/features/array/virtual/flat.js +1 -3
- package/features/array/virtual/index.js +0 -3
- package/features/clear-immediate.js +1 -3
- package/features/index.js +1 -0
- package/features/instance/at.js +8 -0
- package/features/instance/bind.js +1 -0
- package/features/instance/code-point-at.js +1 -0
- package/features/instance/code-points.js +8 -0
- package/features/instance/concat.js +1 -0
- package/features/instance/copy-within.js +1 -0
- package/features/instance/ends-with.js +1 -0
- package/features/instance/entries.js +1 -0
- package/features/instance/every.js +1 -0
- package/features/instance/fill.js +1 -0
- package/features/instance/filter.js +1 -0
- package/features/instance/find-index.js +1 -0
- package/features/instance/find.js +1 -0
- package/features/instance/flags.js +1 -0
- package/features/instance/flat-map.js +1 -0
- package/features/instance/flat.js +1 -0
- package/features/instance/for-each.js +1 -0
- package/features/instance/includes.js +1 -0
- package/features/instance/index-of.js +1 -0
- package/features/instance/keys.js +1 -0
- package/features/instance/last-index-of.js +1 -0
- package/features/instance/map.js +1 -0
- package/features/instance/match-all.js +8 -0
- package/features/instance/pad-end.js +1 -0
- package/features/instance/pad-start.js +1 -0
- package/features/instance/reduce-right.js +1 -0
- package/features/instance/reduce.js +1 -0
- package/features/instance/repeat.js +1 -0
- package/features/instance/replace-all.js +8 -0
- package/features/instance/reverse.js +1 -0
- package/features/instance/slice.js +1 -0
- package/features/instance/some.js +1 -0
- package/features/instance/sort.js +1 -0
- package/features/instance/splice.js +1 -0
- package/features/instance/starts-with.js +1 -0
- package/features/instance/trim-end.js +1 -0
- package/features/instance/trim-left.js +1 -0
- package/features/instance/trim-right.js +1 -0
- package/features/instance/trim-start.js +1 -0
- package/features/instance/trim.js +1 -0
- package/features/instance/values.js +1 -0
- package/features/map/index.js +1 -0
- package/features/map/update.js +4 -0
- package/features/object/from-entries.js +1 -4
- package/features/object/index.js +0 -2
- package/features/promise/any.js +10 -0
- package/features/promise/index.js +2 -0
- package/features/queue-microtask.js +1 -3
- package/features/reflect/delete-property.js +1 -3
- package/features/set/index.js +1 -1
- package/features/set/{is-disjoint-with.js → is-disjoint-from.js} +2 -2
- package/features/set-immediate.js +1 -3
- package/features/set-interval.js +1 -3
- package/features/set-timeout.js +1 -3
- package/features/string/index.js +0 -2
- package/features/string/trim-end.js +1 -3
- package/features/string/trim-left.js +1 -3
- package/features/string/trim-right.js +1 -3
- package/features/string/trim-start.js +1 -3
- package/features/string/virtual/index.js +0 -2
- package/features/string/virtual/trim-end.js +1 -3
- package/features/string/virtual/trim-left.js +1 -3
- package/features/string/virtual/trim-right.js +1 -3
- package/features/string/virtual/trim-start.js +1 -3
- package/index.js +4 -285
- package/internals/a-function.js +3 -2
- package/internals/add-to-unscopables.js +3 -1
- package/internals/advance-string-index.js +2 -2
- package/internals/an-instance.js +1 -1
- package/internals/an-object.js +3 -2
- package/internals/array-buffer-view-core.js +12 -6
- package/internals/array-buffer.js +4 -4
- package/internals/array-for-each.js +5 -3
- package/internals/array-from.js +5 -2
- package/internals/array-last-index-of.js +2 -1
- package/internals/{check-array-species-create.js → array-method-has-species-support.js} +2 -2
- package/internals/array-reduce.js +2 -2
- package/internals/collection-delete-all.js +3 -3
- package/internals/collection-from.js +25 -0
- package/internals/collection-of.js +8 -0
- package/internals/collection-strong.js +9 -9
- package/internals/collection-weak.js +4 -4
- package/internals/collection.js +9 -9
- package/internals/create-html.js +11 -0
- package/internals/date-to-primitive.js +3 -2
- package/internals/export.js +18 -13
- package/internals/fix-regexp-well-known-symbol-logic.js +17 -22
- package/internals/{object-forced-pam.js → forced-object-prototype-accessors-methods.js} +4 -4
- package/internals/forced-string-html-method.js +10 -0
- package/internals/forced-string-trim-method.js +11 -0
- package/internals/function-bind.js +5 -5
- package/internals/get-built-in.js +11 -0
- package/internals/get-iterator.js +3 -2
- package/internals/get-map-iterator.js +2 -2
- package/internals/get-set-iterator.js +2 -2
- package/internals/global.js +2 -2
- package/internals/internal-state.js +4 -5
- package/internals/iterate.js +1 -1
- package/internals/math-scale.js +2 -5
- package/internals/microtask.js +11 -8
- package/internals/native-weak-map.js +4 -0
- package/internals/object-assign.js +5 -5
- package/internals/object-create.js +4 -2
- package/internals/object-define-property.js +1 -1
- package/internals/object-set-prototype-of.js +2 -2
- package/internals/object-to-array.js +12 -12
- package/internals/parse-float.js +1 -1
- package/internals/parse-int.js +1 -1
- package/internals/punycode-to-ascii.js +2 -2
- package/internals/redefine.js +4 -2
- package/internals/reflect-metadata.js +10 -10
- package/internals/regexp-exec-abstract.js +2 -2
- package/internals/regexp-exec.js +3 -5
- package/internals/require-object-coercible.js +1 -1
- package/internals/set-species.js +5 -4
- package/internals/shared.js +2 -2
- package/internals/sloppy-array-method.js +10 -0
- package/internals/string-at.js +13 -15
- package/internals/string-pad.js +3 -2
- package/internals/string-repeat.js +1 -1
- package/internals/string-trim.js +6 -20
- package/internals/this-number-value.js +3 -1
- package/internals/to-index.js +1 -1
- package/internals/to-offset.js +1 -1
- package/internals/typed-array-constructor.js +9 -9
- package/internals/typed-array-from.js +12 -6
- package/internals/typed-arrays-constructors-requires-wrappers.js +6 -5
- package/internals/validate-set-prototype-of-arguments.js +3 -1
- package/internals/validate-string-method-arguments.js +3 -2
- package/internals/well-known-symbol.js +3 -2
- package/modules/es.array-buffer.is-view.js +4 -3
- package/modules/es.array.concat.js +11 -8
- package/modules/es.array.every.js +1 -1
- package/modules/es.array.filter.js +1 -3
- package/modules/{esnext.array.flat-map.js → es.array.flat-map.js} +0 -2
- package/modules/{esnext.array.flat.js → es.array.flat.js} +0 -2
- package/modules/es.array.index-of.js +1 -1
- package/modules/es.array.join.js +1 -1
- package/modules/es.array.map.js +1 -3
- package/modules/es.array.reduce-right.js +1 -1
- package/modules/es.array.reduce.js +1 -1
- package/modules/es.array.slice.js +4 -4
- package/modules/es.array.some.js +1 -1
- package/modules/es.array.sort.js +7 -7
- package/modules/es.array.splice.js +9 -5
- package/modules/es.array.unscopables.flat-map.js +3 -0
- package/modules/es.array.unscopables.flat.js +3 -0
- package/modules/es.date.to-json.js +6 -4
- package/modules/es.function.name.js +12 -9
- package/modules/es.math.acosh.js +7 -6
- package/modules/es.math.asinh.js +3 -3
- package/modules/es.math.imul.js +5 -3
- package/modules/es.math.sinh.js +5 -3
- package/modules/es.number.constructor.js +7 -5
- package/modules/es.number.to-fixed.js +1 -1
- package/modules/es.object.define-getter.js +2 -1
- package/modules/es.object.define-setter.js +2 -1
- package/modules/es.object.entries.js +2 -2
- package/modules/es.object.freeze.js +6 -4
- package/modules/{esnext.object.from-entries.js → es.object.from-entries.js} +0 -0
- package/modules/es.object.get-own-property-descriptor.js +7 -5
- package/modules/es.object.get-own-property-names.js +5 -2
- package/modules/es.object.get-prototype-of.js +8 -4
- package/modules/es.object.is-extensible.js +5 -3
- package/modules/es.object.is-frozen.js +5 -3
- package/modules/es.object.is-sealed.js +5 -3
- package/modules/es.object.keys.js +4 -3
- package/modules/es.object.lookup-getter.js +5 -4
- package/modules/es.object.lookup-setter.js +5 -4
- package/modules/es.object.prevent-extensions.js +6 -4
- package/modules/es.object.seal.js +6 -4
- package/modules/es.object.to-string.js +3 -2
- package/modules/es.object.values.js +2 -2
- package/modules/es.promise.finally.js +15 -14
- package/modules/es.promise.js +15 -4
- package/modules/es.reflect.apply.js +5 -3
- package/modules/es.reflect.get.js +3 -3
- package/modules/es.reflect.prevent-extensions.js +3 -2
- package/modules/es.regexp.constructor.js +9 -5
- package/modules/es.regexp.exec.js +1 -5
- package/modules/es.string.anchor.js +6 -3
- package/modules/es.string.big.js +6 -3
- package/modules/es.string.blink.js +6 -3
- package/modules/es.string.bold.js +6 -3
- package/modules/es.string.code-point-at.js +1 -1
- package/modules/es.string.fixed.js +6 -3
- package/modules/es.string.fontcolor.js +6 -3
- package/modules/es.string.fontsize.js +6 -3
- package/modules/es.string.italics.js +6 -3
- package/modules/es.string.iterator.js +2 -2
- package/modules/es.string.link.js +6 -3
- package/modules/es.string.match.js +3 -2
- package/modules/es.string.replace.js +6 -5
- package/modules/es.string.search.js +3 -2
- package/modules/es.string.small.js +6 -3
- package/modules/es.string.split.js +27 -24
- package/modules/es.string.strike.js +6 -3
- package/modules/es.string.sub.js +6 -3
- package/modules/es.string.sup.js +6 -3
- package/modules/es.string.trim-end.js +14 -0
- package/modules/es.string.trim-start.js +14 -0
- package/modules/es.string.trim.js +7 -4
- package/modules/es.symbol.js +11 -11
- package/modules/es.typed-array.fill.js +2 -1
- package/modules/es.typed-array.join.js +2 -1
- package/modules/es.typed-array.set.js +1 -1
- package/modules/es.weak-map.js +8 -6
- package/modules/esnext.aggregate-error.js +27 -0
- package/modules/esnext.array.last-index.js +2 -0
- package/modules/esnext.array.last-item.js +2 -0
- package/modules/esnext.composite-key.js +3 -3
- package/modules/esnext.composite-symbol.js +4 -9
- package/modules/esnext.map.delete-all.js +1 -1
- package/modules/esnext.map.every.js +1 -1
- package/modules/esnext.map.filter.js +3 -3
- package/modules/esnext.map.find-key.js +1 -1
- package/modules/esnext.map.find.js +1 -1
- package/modules/esnext.map.from.js +3 -1
- package/modules/esnext.map.group-by.js +8 -3
- package/modules/esnext.map.includes.js +1 -1
- package/modules/esnext.map.key-by.js +5 -2
- package/modules/esnext.map.key-of.js +1 -1
- package/modules/esnext.map.map-keys.js +3 -3
- package/modules/esnext.map.map-values.js +3 -3
- package/modules/esnext.map.merge.js +9 -9
- package/modules/esnext.map.of.js +3 -1
- package/modules/esnext.map.reduce.js +2 -2
- package/modules/esnext.map.some.js +1 -1
- package/modules/esnext.map.update.js +19 -0
- package/modules/esnext.number.from-string.js +8 -8
- package/modules/esnext.promise.all-settled.js +3 -3
- package/modules/esnext.promise.any.js +42 -0
- package/modules/esnext.reflect.define-metadata.js +7 -4
- package/modules/esnext.reflect.delete-metadata.js +13 -11
- package/modules/esnext.reflect.get-metadata-keys.js +7 -4
- package/modules/esnext.reflect.get-metadata.js +7 -4
- package/modules/esnext.reflect.get-own-metadata-keys.js +7 -4
- package/modules/esnext.reflect.get-own-metadata.js +7 -5
- package/modules/esnext.reflect.has-metadata.js +7 -4
- package/modules/esnext.reflect.has-own-metadata.js +7 -5
- package/modules/esnext.reflect.metadata.js +8 -11
- package/modules/esnext.set.add-all.js +1 -1
- package/modules/esnext.set.delete-all.js +1 -1
- package/modules/esnext.set.difference.js +2 -3
- package/modules/esnext.set.every.js +1 -1
- package/modules/esnext.set.filter.js +3 -3
- package/modules/esnext.set.find.js +1 -1
- package/modules/esnext.set.from.js +3 -1
- package/modules/esnext.set.intersection.js +2 -3
- package/modules/esnext.set.is-disjoint-from.js +17 -0
- package/modules/esnext.set.is-subset-of.js +16 -2
- package/modules/esnext.set.is-superset-of.js +0 -2
- package/modules/esnext.set.join.js +1 -1
- package/modules/esnext.set.map.js +3 -3
- package/modules/esnext.set.of.js +3 -1
- package/modules/esnext.set.reduce.js +2 -2
- package/modules/esnext.set.some.js +1 -1
- package/modules/esnext.set.symmetric-difference.js +2 -3
- package/modules/esnext.set.union.js +2 -3
- package/modules/esnext.string.at.js +2 -2
- package/modules/esnext.string.code-points.js +3 -5
- package/modules/esnext.string.match-all.js +3 -3
- package/modules/esnext.string.replace-all.js +14 -5
- package/modules/esnext.weak-map.delete-all.js +1 -1
- package/modules/esnext.weak-map.from.js +3 -1
- package/modules/esnext.weak-map.of.js +3 -1
- package/modules/esnext.weak-set.add-all.js +1 -1
- package/modules/esnext.weak-set.delete-all.js +1 -1
- package/modules/esnext.weak-set.from.js +3 -1
- package/modules/esnext.weak-set.of.js +3 -1
- package/modules/web.immediate.js +2 -1
- package/modules/web.queue-microtask.js +1 -1
- package/modules/web.url-search-params.js +2 -2
- package/modules/web.url.js +5 -5
- package/package.json +6 -1
- package/proposals/collection-methods.js +1 -0
- package/proposals/{richer-keys.js → keys-composition.js} +0 -0
- package/proposals/promise-any.js +2 -0
- package/proposals/set-methods.js +1 -1
- package/stable/README.md +1 -0
- package/stable/array/concat.js +1 -0
- package/stable/array/copy-within.js +1 -0
- package/stable/array/entries.js +1 -0
- package/stable/array/every.js +1 -0
- package/stable/array/fill.js +1 -0
- package/stable/array/filter.js +1 -0
- package/stable/array/find-index.js +1 -0
- package/stable/array/find.js +1 -0
- package/stable/array/flat-map.js +1 -0
- package/stable/array/flat.js +1 -0
- package/stable/array/for-each.js +1 -0
- package/stable/array/from.js +1 -0
- package/stable/array/includes.js +1 -0
- package/stable/array/index-of.js +1 -0
- package/stable/array/index.js +1 -0
- package/stable/array/is-array.js +1 -0
- package/stable/array/iterator.js +1 -0
- package/stable/array/join.js +1 -0
- package/stable/array/keys.js +1 -0
- package/stable/array/last-index-of.js +1 -0
- package/stable/array/map.js +1 -0
- package/stable/array/of.js +1 -0
- package/stable/array/reduce-right.js +1 -0
- package/stable/array/reduce.js +1 -0
- package/stable/array/reverse.js +1 -0
- package/stable/array/slice.js +1 -0
- package/stable/array/some.js +1 -0
- package/stable/array/sort.js +1 -0
- package/stable/array/splice.js +1 -0
- package/stable/array/values.js +1 -0
- package/stable/array/virtual/concat.js +1 -0
- package/stable/array/virtual/copy-within.js +1 -0
- package/stable/array/virtual/entries.js +1 -0
- package/stable/array/virtual/every.js +1 -0
- package/stable/array/virtual/fill.js +1 -0
- package/stable/array/virtual/filter.js +1 -0
- package/stable/array/virtual/find-index.js +1 -0
- package/stable/array/virtual/find.js +1 -0
- package/stable/array/virtual/flat-map.js +1 -0
- package/stable/array/virtual/flat.js +1 -0
- package/stable/array/virtual/for-each.js +1 -0
- package/stable/array/virtual/includes.js +1 -0
- package/stable/array/virtual/index-of.js +1 -0
- package/stable/array/virtual/index.js +1 -0
- package/stable/array/virtual/iterator.js +1 -0
- package/stable/array/virtual/join.js +1 -0
- package/stable/array/virtual/keys.js +1 -0
- package/stable/array/virtual/last-index-of.js +1 -0
- package/stable/array/virtual/map.js +1 -0
- package/stable/array/virtual/reduce-right.js +1 -0
- package/stable/array/virtual/reduce.js +1 -0
- package/stable/array/virtual/reverse.js +1 -0
- package/stable/array/virtual/slice.js +1 -0
- package/stable/array/virtual/some.js +1 -0
- package/stable/array/virtual/sort.js +1 -0
- package/stable/array/virtual/splice.js +1 -0
- package/stable/array/virtual/values.js +1 -0
- package/stable/array-buffer/constructor.js +1 -0
- package/stable/array-buffer/index.js +1 -0
- package/stable/array-buffer/is-view.js +1 -0
- package/stable/array-buffer/slice.js +1 -0
- package/stable/clear-immediate.js +3 -0
- package/stable/data-view/index.js +1 -0
- package/stable/date/index.js +1 -0
- package/stable/date/now.js +1 -0
- package/stable/date/to-iso-string.js +1 -0
- package/stable/date/to-json.js +1 -0
- package/stable/date/to-primitive.js +1 -0
- package/stable/date/to-string.js +1 -0
- package/stable/dom-collections/for-each.js +3 -0
- package/stable/dom-collections/index.js +11 -0
- package/stable/dom-collections/iterator.js +3 -0
- package/stable/function/bind.js +1 -0
- package/stable/function/has-instance.js +1 -0
- package/stable/function/index.js +1 -0
- package/stable/function/name.js +1 -0
- package/stable/function/virtual/bind.js +1 -0
- package/stable/function/virtual/index.js +1 -0
- package/stable/global-this.js +3 -0
- package/stable/index.js +4 -0
- package/stable/instance/bind.js +1 -0
- package/stable/instance/code-point-at.js +1 -0
- package/stable/instance/concat.js +1 -0
- package/stable/instance/copy-within.js +1 -0
- package/stable/instance/ends-with.js +1 -0
- package/stable/instance/entries.js +16 -0
- package/stable/instance/every.js +1 -0
- package/stable/instance/fill.js +1 -0
- package/stable/instance/filter.js +1 -0
- package/stable/instance/find-index.js +1 -0
- package/stable/instance/find.js +1 -0
- package/stable/instance/flags.js +1 -0
- package/stable/instance/flat-map.js +1 -0
- package/stable/instance/flat.js +1 -0
- package/stable/instance/for-each.js +16 -0
- package/stable/instance/includes.js +1 -0
- package/stable/instance/index-of.js +1 -0
- package/stable/instance/keys.js +16 -0
- package/stable/instance/last-index-of.js +1 -0
- package/stable/instance/map.js +1 -0
- package/stable/instance/pad-end.js +1 -0
- package/stable/instance/pad-start.js +1 -0
- package/stable/instance/reduce-right.js +1 -0
- package/stable/instance/reduce.js +1 -0
- package/stable/instance/repeat.js +1 -0
- package/stable/instance/reverse.js +1 -0
- package/stable/instance/slice.js +1 -0
- package/stable/instance/some.js +1 -0
- package/stable/instance/sort.js +1 -0
- package/stable/instance/splice.js +1 -0
- package/stable/instance/starts-with.js +1 -0
- package/stable/instance/trim-end.js +1 -0
- package/stable/instance/trim-left.js +1 -0
- package/stable/instance/trim-right.js +1 -0
- package/stable/instance/trim-start.js +1 -0
- package/stable/instance/trim.js +1 -0
- package/stable/instance/values.js +16 -0
- package/stable/json/index.js +1 -0
- package/stable/json/stringify.js +1 -0
- package/stable/json/to-string-tag.js +1 -0
- package/stable/map/index.js +1 -0
- package/stable/math/acosh.js +1 -0
- package/stable/math/asinh.js +1 -0
- package/stable/math/atanh.js +1 -0
- package/stable/math/cbrt.js +1 -0
- package/stable/math/clz32.js +1 -0
- package/stable/math/cosh.js +1 -0
- package/stable/math/expm1.js +1 -0
- package/stable/math/fround.js +1 -0
- package/stable/math/hypot.js +1 -0
- package/stable/math/imul.js +1 -0
- package/stable/math/index.js +1 -0
- package/stable/math/log10.js +1 -0
- package/stable/math/log1p.js +1 -0
- package/stable/math/log2.js +1 -0
- package/stable/math/sign.js +1 -0
- package/stable/math/sinh.js +1 -0
- package/stable/math/tanh.js +1 -0
- package/stable/math/to-string-tag.js +1 -0
- package/stable/math/trunc.js +1 -0
- package/stable/number/constructor.js +1 -0
- package/stable/number/epsilon.js +1 -0
- package/stable/number/index.js +1 -0
- package/stable/number/is-finite.js +1 -0
- package/stable/number/is-integer.js +1 -0
- package/stable/number/is-nan.js +1 -0
- package/stable/number/is-safe-integer.js +1 -0
- package/stable/number/max-safe-integer.js +1 -0
- package/stable/number/min-safe-integer.js +1 -0
- package/stable/number/parse-float.js +1 -0
- package/stable/number/parse-int.js +1 -0
- package/stable/number/to-fixed.js +1 -0
- package/stable/number/to-precision.js +1 -0
- package/stable/number/virtual/index.js +1 -0
- package/stable/number/virtual/to-fixed.js +1 -0
- package/stable/number/virtual/to-precision.js +1 -0
- package/stable/object/assign.js +1 -0
- package/stable/object/create.js +1 -0
- package/stable/object/define-getter.js +1 -0
- package/stable/object/define-properties.js +1 -0
- package/stable/object/define-property.js +1 -0
- package/stable/object/define-setter.js +1 -0
- package/stable/object/entries.js +1 -0
- package/stable/object/freeze.js +1 -0
- package/stable/object/from-entries.js +1 -0
- package/stable/object/get-own-property-descriptor.js +1 -0
- package/stable/object/get-own-property-descriptors.js +1 -0
- package/stable/object/get-own-property-names.js +1 -0
- package/stable/object/get-own-property-symbols.js +1 -0
- package/stable/object/get-prototype-of.js +1 -0
- package/stable/object/index.js +1 -0
- package/stable/object/is-extensible.js +1 -0
- package/stable/object/is-frozen.js +1 -0
- package/stable/object/is-sealed.js +1 -0
- package/stable/object/is.js +1 -0
- package/stable/object/keys.js +1 -0
- package/stable/object/lookup-getter.js +1 -0
- package/stable/object/lookup-setter.js +1 -0
- package/stable/object/prevent-extensions.js +1 -0
- package/stable/object/seal.js +1 -0
- package/stable/object/set-prototype-of.js +1 -0
- package/stable/object/to-string.js +1 -0
- package/stable/object/values.js +1 -0
- package/stable/parse-float.js +1 -0
- package/stable/parse-int.js +1 -0
- package/stable/promise/finally.js +1 -0
- package/stable/promise/index.js +1 -0
- package/stable/queue-microtask.js +1 -0
- package/stable/reflect/apply.js +1 -0
- package/stable/reflect/construct.js +1 -0
- package/stable/reflect/define-property.js +1 -0
- package/stable/reflect/delete-property.js +1 -0
- package/stable/reflect/get-own-property-descriptor.js +1 -0
- package/stable/reflect/get-prototype-of.js +1 -0
- package/stable/reflect/get.js +1 -0
- package/stable/reflect/has.js +1 -0
- package/stable/reflect/index.js +1 -0
- package/stable/reflect/is-extensible.js +1 -0
- package/stable/reflect/own-keys.js +1 -0
- package/stable/reflect/prevent-extensions.js +1 -0
- package/stable/reflect/set-prototype-of.js +1 -0
- package/stable/reflect/set.js +1 -0
- package/stable/regexp/constructor.js +1 -0
- package/stable/regexp/flags.js +1 -0
- package/stable/regexp/index.js +1 -0
- package/stable/regexp/match.js +1 -0
- package/stable/regexp/replace.js +1 -0
- package/stable/regexp/search.js +1 -0
- package/stable/regexp/split.js +1 -0
- package/stable/regexp/to-string.js +1 -0
- package/stable/set/index.js +1 -0
- package/stable/set-immediate.js +3 -0
- package/stable/set-interval.js +3 -0
- package/stable/set-timeout.js +3 -0
- package/stable/string/anchor.js +1 -0
- package/stable/string/big.js +1 -0
- package/stable/string/blink.js +1 -0
- package/stable/string/bold.js +1 -0
- package/stable/string/code-point-at.js +1 -0
- package/stable/string/ends-with.js +1 -0
- package/stable/string/fixed.js +1 -0
- package/stable/string/fontcolor.js +1 -0
- package/stable/string/fontsize.js +1 -0
- package/stable/string/from-code-point.js +1 -0
- package/stable/string/includes.js +1 -0
- package/stable/string/index.js +1 -0
- package/stable/string/italics.js +1 -0
- package/stable/string/iterator.js +1 -0
- package/stable/string/link.js +1 -0
- package/stable/string/match.js +1 -0
- package/stable/string/pad-end.js +1 -0
- package/stable/string/pad-start.js +1 -0
- package/stable/string/raw.js +1 -0
- package/stable/string/repeat.js +1 -0
- package/stable/string/replace.js +1 -0
- package/stable/string/search.js +1 -0
- package/stable/string/small.js +1 -0
- package/stable/string/split.js +1 -0
- package/stable/string/starts-with.js +1 -0
- package/stable/string/strike.js +1 -0
- package/stable/string/sub.js +1 -0
- package/stable/string/sup.js +1 -0
- package/stable/string/trim-end.js +1 -0
- package/stable/string/trim-left.js +1 -0
- package/stable/string/trim-right.js +1 -0
- package/stable/string/trim-start.js +1 -0
- package/stable/string/trim.js +1 -0
- package/stable/string/virtual/anchor.js +1 -0
- package/stable/string/virtual/big.js +1 -0
- package/stable/string/virtual/blink.js +1 -0
- package/stable/string/virtual/bold.js +1 -0
- package/stable/string/virtual/code-point-at.js +1 -0
- package/stable/string/virtual/ends-with.js +1 -0
- package/stable/string/virtual/fixed.js +1 -0
- package/stable/string/virtual/fontcolor.js +1 -0
- package/stable/string/virtual/fontsize.js +1 -0
- package/stable/string/virtual/includes.js +1 -0
- package/stable/string/virtual/index.js +1 -0
- package/stable/string/virtual/italics.js +1 -0
- package/stable/string/virtual/iterator.js +1 -0
- package/stable/string/virtual/link.js +1 -0
- package/stable/string/virtual/pad-end.js +1 -0
- package/stable/string/virtual/pad-start.js +1 -0
- package/stable/string/virtual/repeat.js +1 -0
- package/stable/string/virtual/small.js +1 -0
- package/stable/string/virtual/starts-with.js +1 -0
- package/stable/string/virtual/strike.js +1 -0
- package/stable/string/virtual/sub.js +1 -0
- package/stable/string/virtual/sup.js +1 -0
- package/stable/string/virtual/trim-end.js +1 -0
- package/stable/string/virtual/trim-left.js +1 -0
- package/stable/string/virtual/trim-right.js +1 -0
- package/stable/string/virtual/trim-start.js +1 -0
- package/stable/string/virtual/trim.js +1 -0
- package/stable/symbol/async-iterator.js +1 -0
- package/stable/symbol/description.js +1 -0
- package/stable/symbol/for.js +1 -0
- package/stable/symbol/has-instance.js +1 -0
- package/stable/symbol/index.js +1 -0
- package/stable/symbol/is-concat-spreadable.js +1 -0
- package/stable/symbol/iterator.js +1 -0
- package/stable/symbol/key-for.js +1 -0
- package/stable/symbol/match.js +1 -0
- package/stable/symbol/replace.js +1 -0
- package/stable/symbol/search.js +1 -0
- package/stable/symbol/species.js +1 -0
- package/stable/symbol/split.js +1 -0
- package/stable/symbol/to-primitive.js +1 -0
- package/stable/symbol/to-string-tag.js +1 -0
- package/stable/symbol/unscopables.js +1 -0
- package/stable/typed-array/copy-within.js +1 -0
- package/stable/typed-array/entries.js +1 -0
- package/stable/typed-array/every.js +1 -0
- package/stable/typed-array/fill.js +1 -0
- package/stable/typed-array/filter.js +1 -0
- package/stable/typed-array/find-index.js +1 -0
- package/stable/typed-array/find.js +1 -0
- package/stable/typed-array/float32-array.js +1 -0
- package/stable/typed-array/float64-array.js +1 -0
- package/stable/typed-array/for-each.js +1 -0
- package/stable/typed-array/from.js +1 -0
- package/stable/typed-array/includes.js +1 -0
- package/stable/typed-array/index-of.js +1 -0
- package/stable/typed-array/index.js +1 -0
- package/stable/typed-array/int16-array.js +1 -0
- package/stable/typed-array/int32-array.js +1 -0
- package/stable/typed-array/int8-array.js +1 -0
- package/stable/typed-array/iterator.js +1 -0
- package/stable/typed-array/join.js +1 -0
- package/stable/typed-array/keys.js +1 -0
- package/stable/typed-array/last-index-of.js +1 -0
- package/stable/typed-array/map.js +1 -0
- package/stable/typed-array/of.js +1 -0
- package/stable/typed-array/reduce-right.js +1 -0
- package/stable/typed-array/reduce.js +1 -0
- package/stable/typed-array/reverse.js +1 -0
- package/stable/typed-array/set.js +1 -0
- package/stable/typed-array/slice.js +1 -0
- package/stable/typed-array/some.js +1 -0
- package/stable/typed-array/sort.js +1 -0
- package/stable/typed-array/subarray.js +1 -0
- package/stable/typed-array/to-locale-string.js +1 -0
- package/stable/typed-array/to-string.js +1 -0
- package/stable/typed-array/uint16-array.js +1 -0
- package/stable/typed-array/uint32-array.js +1 -0
- package/stable/typed-array/uint8-array.js +1 -0
- package/stable/typed-array/uint8-clamped-array.js +1 -0
- package/stable/typed-array/values.js +1 -0
- package/stable/url/index.js +1 -0
- package/stable/url/to-json.js +1 -0
- package/stable/url-search-params/index.js +1 -0
- package/stable/weak-map/index.js +1 -0
- package/stable/weak-set/index.js +1 -0
- package/stage/0.js +1 -0
- package/stage/1.js +1 -2
- package/stage/2.js +1 -0
- package/stage/3.js +0 -3
- package/internals/object-statics-accept-primitives.js +0 -11
- package/internals/set-collection-from.js +0 -28
- package/internals/set-collection-of.js +0 -12
- package/internals/set-is-disjoint-or-subset.js +0 -16
- package/internals/strict-method.js +0 -9
- package/internals/string-html.js +0 -21
- package/modules/esnext.set.is-disjoint-with.js +0 -10
- package/modules/esnext.string.trim-left.js +0 -8
- package/modules/esnext.string.trim-right.js +0 -8
- package/proposals/array-flat-and-flat-map.js +0 -2
- package/proposals/object-from-entries.js +0 -2
- package/proposals/string-trim-start-end.js +0 -2
package/modules/es.symbol.js
CHANGED
|
@@ -48,7 +48,7 @@ var ObjectPrototypeSymbols = shared('op-symbols');
|
|
|
48
48
|
var WellKnownSymbolsStore = shared('wks');
|
|
49
49
|
var ObjectPrototype = Object[PROTOTYPE];
|
|
50
50
|
var QObject = global.QObject;
|
|
51
|
-
var
|
|
51
|
+
var NATIVE_SYMBOL = require('../internals/native-symbol');
|
|
52
52
|
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
|
|
53
53
|
var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
|
|
54
54
|
|
|
@@ -77,10 +77,10 @@ var wrap = function (tag, description) {
|
|
|
77
77
|
return symbol;
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
-
var isSymbol =
|
|
80
|
+
var isSymbol = NATIVE_SYMBOL && typeof $Symbol.iterator == 'symbol' ? function (it) {
|
|
81
81
|
return typeof it == 'symbol';
|
|
82
82
|
} : function (it) {
|
|
83
|
-
return it instanceof $Symbol;
|
|
83
|
+
return Object(it) instanceof $Symbol;
|
|
84
84
|
};
|
|
85
85
|
|
|
86
86
|
var $defineProperty = function defineProperty(it, key, D) {
|
|
@@ -151,9 +151,9 @@ var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
|
|
|
151
151
|
|
|
152
152
|
// `Symbol` constructor
|
|
153
153
|
// https://tc39.github.io/ecma262/#sec-symbol-constructor
|
|
154
|
-
if (!
|
|
154
|
+
if (!NATIVE_SYMBOL) {
|
|
155
155
|
$Symbol = function Symbol() {
|
|
156
|
-
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor
|
|
156
|
+
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
|
|
157
157
|
var description = arguments[0] === undefined ? undefined : String(arguments[0]);
|
|
158
158
|
var tag = uid(description);
|
|
159
159
|
var setter = function (value) {
|
|
@@ -192,13 +192,13 @@ if (!USE_NATIVE) {
|
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
-
$export({ global: true, wrap: true, forced: !
|
|
195
|
+
$export({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, { Symbol: $Symbol });
|
|
196
196
|
|
|
197
197
|
for (var wellKnownSymbols = objectKeys(WellKnownSymbolsStore), k = 0; wellKnownSymbols.length > k;) {
|
|
198
198
|
defineWellKnownSymbol(wellKnownSymbols[k++]);
|
|
199
199
|
}
|
|
200
200
|
|
|
201
|
-
$export({ target: SYMBOL, stat: true, forced: !
|
|
201
|
+
$export({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
|
|
202
202
|
// `Symbol.for` method
|
|
203
203
|
// https://tc39.github.io/ecma262/#sec-symbol.for
|
|
204
204
|
'for': function (key) {
|
|
@@ -209,14 +209,14 @@ $export({ target: SYMBOL, stat: true, forced: !USE_NATIVE }, {
|
|
|
209
209
|
// `Symbol.keyFor` method
|
|
210
210
|
// https://tc39.github.io/ecma262/#sec-symbol.keyfor
|
|
211
211
|
keyFor: function keyFor(sym) {
|
|
212
|
-
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol
|
|
212
|
+
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
|
|
213
213
|
for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
|
|
214
214
|
},
|
|
215
215
|
useSetter: function () { USE_SETTER = true; },
|
|
216
216
|
useSimple: function () { USE_SETTER = false; }
|
|
217
217
|
});
|
|
218
218
|
|
|
219
|
-
$export({ target: 'Object', stat: true, forced: !
|
|
219
|
+
$export({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
|
|
220
220
|
// `Object.create` method
|
|
221
221
|
// https://tc39.github.io/ecma262/#sec-object.create
|
|
222
222
|
create: $create,
|
|
@@ -231,7 +231,7 @@ $export({ target: 'Object', stat: true, forced: !USE_NATIVE, sham: !DESCRIPTORS
|
|
|
231
231
|
getOwnPropertyDescriptor: $getOwnPropertyDescriptor
|
|
232
232
|
});
|
|
233
233
|
|
|
234
|
-
$export({ target: 'Object', stat: true, forced: !
|
|
234
|
+
$export({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {
|
|
235
235
|
// `Object.getOwnPropertyNames` method
|
|
236
236
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
|
|
237
237
|
getOwnPropertyNames: $getOwnPropertyNames,
|
|
@@ -242,7 +242,7 @@ $export({ target: 'Object', stat: true, forced: !USE_NATIVE }, {
|
|
|
242
242
|
|
|
243
243
|
// `JSON.stringify` method behavior with symbols
|
|
244
244
|
// https://tc39.github.io/ecma262/#sec-json.stringify
|
|
245
|
-
JSON && $export({ target: 'JSON', stat: true, forced: !
|
|
245
|
+
JSON && $export({ target: 'JSON', stat: true, forced: !NATIVE_SYMBOL || fails(function () {
|
|
246
246
|
var symbol = $Symbol();
|
|
247
247
|
// MS Edge converts symbol values to JSON as {}
|
|
248
248
|
return nativeJSONStringify([symbol]) != '[null]'
|
|
@@ -5,6 +5,7 @@ var aTypedArray = ArrayBufferViewCore.aTypedArray;
|
|
|
5
5
|
|
|
6
6
|
// `%TypedArray%.prototype.fill` method
|
|
7
7
|
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.fill
|
|
8
|
-
|
|
8
|
+
// eslint-disable-next-line no-unused-vars
|
|
9
|
+
ArrayBufferViewCore.exportProto('fill', function fill(value /* , start, end */) {
|
|
9
10
|
return arrayFill.apply(aTypedArray(this), arguments);
|
|
10
11
|
});
|
|
@@ -5,6 +5,7 @@ var arrayJoin = [].join;
|
|
|
5
5
|
|
|
6
6
|
// `%TypedArray%.prototype.join` method
|
|
7
7
|
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.join
|
|
8
|
-
|
|
8
|
+
// eslint-disable-next-line no-unused-vars
|
|
9
|
+
ArrayBufferViewCore.exportProto('join', function join(separator) {
|
|
9
10
|
return arrayJoin.apply(aTypedArray(this), arguments);
|
|
10
11
|
});
|
|
@@ -19,6 +19,6 @@ ArrayBufferViewCore.exportProto('set', function set(arrayLike /* , offset */) {
|
|
|
19
19
|
var src = toObject(arrayLike);
|
|
20
20
|
var len = toLength(src.length);
|
|
21
21
|
var index = 0;
|
|
22
|
-
if (len + offset > length) throw RangeError('Wrong length
|
|
22
|
+
if (len + offset > length) throw RangeError('Wrong length');
|
|
23
23
|
while (index < len) this[offset + index] = src[index++];
|
|
24
24
|
}, FORCED);
|
package/modules/es.weak-map.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var global = require('../internals/global');
|
|
2
3
|
var redefineAll = require('../internals/redefine-all');
|
|
3
4
|
var InternalMetadataModule = require('../internals/internal-metadata');
|
|
4
5
|
var weak = require('../internals/collection-weak');
|
|
5
6
|
var isObject = require('../internals/is-object');
|
|
6
|
-
var fails = require('../internals/fails');
|
|
7
7
|
var enforceIternalState = require('../internals/internal-state').enforce;
|
|
8
|
-
var
|
|
8
|
+
var NATIVE_WEAK_MAP = require('../internals/native-weak-map');
|
|
9
|
+
var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;
|
|
9
10
|
var isExtensible = Object.isExtensible;
|
|
10
|
-
var test = {};
|
|
11
11
|
var InternalWeakMap;
|
|
12
12
|
|
|
13
13
|
var wrapper = function (get) {
|
|
@@ -18,11 +18,13 @@ var wrapper = function (get) {
|
|
|
18
18
|
|
|
19
19
|
// `WeakMap` constructor
|
|
20
20
|
// https://tc39.github.io/ecma262/#sec-weakmap-constructor
|
|
21
|
-
var $WeakMap = module.exports = require('../internals/collection')(
|
|
21
|
+
var $WeakMap = module.exports = require('../internals/collection')('WeakMap', wrapper, weak, true, true);
|
|
22
22
|
|
|
23
23
|
// IE11 WeakMap frozen keys fix
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
// We can't use feature detection because it crash some old IE builds
|
|
25
|
+
// https://github.com/zloirock/core-js/issues/485
|
|
26
|
+
if (NATIVE_WEAK_MAP && IS_IE11) {
|
|
27
|
+
InternalWeakMap = weak.getConstructor(wrapper, 'WeakMap', true);
|
|
26
28
|
InternalMetadataModule.REQUIRED = true;
|
|
27
29
|
var WeakMapPrototype = $WeakMap.prototype;
|
|
28
30
|
var nativeDelete = WeakMapPrototype['delete'];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var getPrototypeOf = require('../internals/object-get-prototype-of');
|
|
2
|
+
var setPrototypeOf = require('../internals/object-set-prototype-of');
|
|
3
|
+
var create = require('../internals/object-create');
|
|
4
|
+
var iterate = require('../internals/iterate');
|
|
5
|
+
var hide = require('../internals/hide');
|
|
6
|
+
|
|
7
|
+
var $AggregateError = function AggregateError(errors, message) {
|
|
8
|
+
var that = this;
|
|
9
|
+
if (!(that instanceof $AggregateError)) return new $AggregateError(errors, message);
|
|
10
|
+
if (setPrototypeOf) {
|
|
11
|
+
that = setPrototypeOf(new Error(message), getPrototypeOf(that));
|
|
12
|
+
}
|
|
13
|
+
var errorsArray = [];
|
|
14
|
+
iterate(errors, errorsArray.push, errorsArray);
|
|
15
|
+
that.errors = errorsArray;
|
|
16
|
+
if (message !== undefined) hide(that, 'message', String(message));
|
|
17
|
+
return that;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
$AggregateError.prototype = create(Error.prototype, {
|
|
21
|
+
constructor: { value: $AggregateError, configurable: true, writable: true },
|
|
22
|
+
name: { value: 'AggregateError', configurable: true, writable: true }
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
require('../internals/export')({ global: true }, {
|
|
26
|
+
AggregateError: $AggregateError
|
|
27
|
+
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var getCompositeKeyNode = require('../internals/composite-key');
|
|
2
|
+
var getBuiltIn = require('../internals/get-built-in');
|
|
2
3
|
var create = require('../internals/object-create');
|
|
3
|
-
var $Object = require('../internals/path').Object;
|
|
4
|
-
var freeze = $Object && $Object.freeze;
|
|
5
4
|
|
|
6
5
|
var initializer = function () {
|
|
6
|
+
var freeze = getBuiltIn('Object', 'freeze');
|
|
7
7
|
return freeze ? freeze(create(null)) : create(null);
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
// https://github.com/
|
|
10
|
+
// https://github.com/tc39/proposal-richer-keys/tree/master/compositeKey
|
|
11
11
|
require('../internals/export')({ global: true }, {
|
|
12
12
|
compositeKey: function compositeKey() {
|
|
13
13
|
return getCompositeKeyNode.apply(Object, arguments).get('object', initializer);
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
var getCompositeKeyNode = require('../internals/composite-key');
|
|
2
|
-
var
|
|
3
|
-
var global = require('../internals/global');
|
|
2
|
+
var getBuiltIn = require('../internals/get-built-in');
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
return typeof path.Symbol === 'function' ? path.Symbol : global.Symbol;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
// https://github.com/bmeck/proposal-richer-keys/tree/master/compositeKey
|
|
4
|
+
// https://github.com/tc39/proposal-richer-keys/tree/master/compositeKey
|
|
10
5
|
require('../internals/export')({ global: true }, {
|
|
11
6
|
compositeSymbol: function compositeSymbol() {
|
|
12
|
-
if (arguments.length === 1 && typeof arguments[0] === 'string') return
|
|
13
|
-
return getCompositeKeyNode.apply(null, arguments).get('symbol',
|
|
7
|
+
if (arguments.length === 1 && typeof arguments[0] === 'string') return getBuiltIn('Symbol')['for'](arguments[0]);
|
|
8
|
+
return getCompositeKeyNode.apply(null, arguments).get('symbol', getBuiltIn('Symbol'));
|
|
14
9
|
}
|
|
15
10
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var collectionDeleteAll = require('../internals/collection-delete-all');
|
|
3
3
|
|
|
4
4
|
// `Map.prototype.deleteAll` method
|
|
5
|
-
// https://github.com/tc39/collection-methods
|
|
5
|
+
// https://github.com/tc39/proposal-collection-methods
|
|
6
6
|
require('../internals/export')({
|
|
7
7
|
target: 'Map', proto: true, real: true, forced: require('../internals/is-pure')
|
|
8
8
|
}, {
|
|
@@ -4,7 +4,7 @@ var bind = require('../internals/bind-context');
|
|
|
4
4
|
var getMapIterator = require('../internals/get-map-iterator');
|
|
5
5
|
|
|
6
6
|
// `Map.prototype.every` method
|
|
7
|
-
// https://github.com/tc39/collection-methods
|
|
7
|
+
// https://github.com/tc39/proposal-collection-methods
|
|
8
8
|
require('../internals/export')({ target: 'Map', proto: true, real: true, forced: require('../internals/is-pure') }, {
|
|
9
9
|
every: function every(callbackfn /* , thisArg */) {
|
|
10
10
|
var map = anObject(this);
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var getBuiltIn = require('../internals/get-built-in');
|
|
2
3
|
var anObject = require('../internals/an-object');
|
|
3
4
|
var aFunction = require('../internals/a-function');
|
|
4
5
|
var bind = require('../internals/bind-context');
|
|
5
6
|
var speciesConstructor = require('../internals/species-constructor');
|
|
6
7
|
var getMapIterator = require('../internals/get-map-iterator');
|
|
7
|
-
var Map = require('../internals/path').Map;
|
|
8
8
|
|
|
9
9
|
// `Map.prototype.filter` method
|
|
10
|
-
// https://github.com/tc39/collection-methods
|
|
10
|
+
// https://github.com/tc39/proposal-collection-methods
|
|
11
11
|
require('../internals/export')({ target: 'Map', proto: true, real: true, forced: require('../internals/is-pure') }, {
|
|
12
12
|
filter: function filter(callbackfn /* , thisArg */) {
|
|
13
13
|
var map = anObject(this);
|
|
14
14
|
var iterator = getMapIterator(map);
|
|
15
15
|
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
|
|
16
|
-
var newMap = new (speciesConstructor(map, Map))();
|
|
16
|
+
var newMap = new (speciesConstructor(map, getBuiltIn('Map')))();
|
|
17
17
|
var setter = aFunction(newMap.set);
|
|
18
18
|
var step, entry, key, value;
|
|
19
19
|
while (!(step = iterator.next()).done) {
|
|
@@ -4,7 +4,7 @@ var bind = require('../internals/bind-context');
|
|
|
4
4
|
var getMapIterator = require('../internals/get-map-iterator');
|
|
5
5
|
|
|
6
6
|
// `Map.prototype.findKey` method
|
|
7
|
-
// https://github.com/tc39/collection-methods
|
|
7
|
+
// https://github.com/tc39/proposal-collection-methods
|
|
8
8
|
require('../internals/export')({ target: 'Map', proto: true, real: true, forced: require('../internals/is-pure') }, {
|
|
9
9
|
findKey: function findKey(callbackfn /* , thisArg */) {
|
|
10
10
|
var map = anObject(this);
|
|
@@ -4,7 +4,7 @@ var bind = require('../internals/bind-context');
|
|
|
4
4
|
var getMapIterator = require('../internals/get-map-iterator');
|
|
5
5
|
|
|
6
6
|
// `Map.prototype.find` method
|
|
7
|
-
// https://github.com/tc39/collection-methods
|
|
7
|
+
// https://github.com/tc39/proposal-collection-methods
|
|
8
8
|
require('../internals/export')({ target: 'Map', proto: true, real: true, forced: require('../internals/is-pure') }, {
|
|
9
9
|
find: function find(callbackfn /* , thisArg */) {
|
|
10
10
|
var map = anObject(this);
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var iterate = require('../internals/iterate');
|
|
3
|
+
var aFunction = require('../internals/a-function');
|
|
3
4
|
|
|
4
5
|
// `Map.groupBy` method
|
|
5
|
-
// https://github.com/tc39/collection-methods
|
|
6
|
+
// https://github.com/tc39/proposal-collection-methods
|
|
6
7
|
require('../internals/export')({ target: 'Map', stat: true, forced: require('../internals/is-pure') }, {
|
|
7
8
|
groupBy: function groupBy(iterable, keyDerivative) {
|
|
8
9
|
var newMap = new this();
|
|
10
|
+
aFunction(keyDerivative);
|
|
11
|
+
var has = aFunction(newMap.has);
|
|
12
|
+
var get = aFunction(newMap.get);
|
|
13
|
+
var set = aFunction(newMap.set);
|
|
9
14
|
iterate(iterable, function (element) {
|
|
10
15
|
var derivedKey = keyDerivative(element);
|
|
11
|
-
if (!
|
|
12
|
-
else
|
|
16
|
+
if (!has.call(newMap, derivedKey)) set.call(newMap, derivedKey, [element]);
|
|
17
|
+
else get.call(newMap, derivedKey).push(element);
|
|
13
18
|
});
|
|
14
19
|
return newMap;
|
|
15
20
|
}
|
|
@@ -4,7 +4,7 @@ var getMapIterator = require('../internals/get-map-iterator');
|
|
|
4
4
|
var sameValueZero = require('../internals/same-value-zero');
|
|
5
5
|
|
|
6
6
|
// `Map.prototype.includes` method
|
|
7
|
-
// https://github.com/tc39/collection-methods
|
|
7
|
+
// https://github.com/tc39/proposal-collection-methods
|
|
8
8
|
require('../internals/export')({ target: 'Map', proto: true, real: true, forced: require('../internals/is-pure') }, {
|
|
9
9
|
includes: function includes(searchElement) {
|
|
10
10
|
var map = anObject(this);
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var iterate = require('../internals/iterate');
|
|
3
|
+
var aFunction = require('../internals/a-function');
|
|
3
4
|
|
|
4
5
|
// `Map.keyBy` method
|
|
5
|
-
// https://github.com/tc39/collection-methods
|
|
6
|
+
// https://github.com/tc39/proposal-collection-methods
|
|
6
7
|
require('../internals/export')({ target: 'Map', stat: true, forced: require('../internals/is-pure') }, {
|
|
7
8
|
keyBy: function keyBy(iterable, keyDerivative) {
|
|
8
9
|
var newMap = new this();
|
|
10
|
+
aFunction(keyDerivative);
|
|
11
|
+
var setter = aFunction(newMap.set);
|
|
9
12
|
iterate(iterable, function (element) {
|
|
10
|
-
|
|
13
|
+
setter.call(newMap, keyDerivative(element), element);
|
|
11
14
|
});
|
|
12
15
|
return newMap;
|
|
13
16
|
}
|
|
@@ -3,7 +3,7 @@ var anObject = require('../internals/an-object');
|
|
|
3
3
|
var getMapIterator = require('../internals/get-map-iterator');
|
|
4
4
|
|
|
5
5
|
// `Map.prototype.includes` method
|
|
6
|
-
// https://github.com/tc39/collection-methods
|
|
6
|
+
// https://github.com/tc39/proposal-collection-methods
|
|
7
7
|
require('../internals/export')({ target: 'Map', proto: true, real: true, forced: require('../internals/is-pure') }, {
|
|
8
8
|
keyOf: function keyOf(searchElement) {
|
|
9
9
|
var map = anObject(this);
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var getBuiltIn = require('../internals/get-built-in');
|
|
2
3
|
var anObject = require('../internals/an-object');
|
|
3
4
|
var aFunction = require('../internals/a-function');
|
|
4
5
|
var bind = require('../internals/bind-context');
|
|
5
6
|
var speciesConstructor = require('../internals/species-constructor');
|
|
6
7
|
var getMapIterator = require('../internals/get-map-iterator');
|
|
7
|
-
var Map = require('../internals/path').Map;
|
|
8
8
|
|
|
9
9
|
// `Map.prototype.mapKeys` method
|
|
10
|
-
// https://github.com/tc39/collection-methods
|
|
10
|
+
// https://github.com/tc39/proposal-collection-methods
|
|
11
11
|
require('../internals/export')({ target: 'Map', proto: true, real: true, forced: require('../internals/is-pure') }, {
|
|
12
12
|
mapKeys: function mapKeys(callbackfn /* , thisArg */) {
|
|
13
13
|
var map = anObject(this);
|
|
14
14
|
var iterator = getMapIterator(map);
|
|
15
15
|
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
|
|
16
|
-
var newMap = new (speciesConstructor(map, Map))();
|
|
16
|
+
var newMap = new (speciesConstructor(map, getBuiltIn('Map')))();
|
|
17
17
|
var setter = aFunction(newMap.set);
|
|
18
18
|
var step, entry, value;
|
|
19
19
|
while (!(step = iterator.next()).done) {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var getBuiltIn = require('../internals/get-built-in');
|
|
2
3
|
var anObject = require('../internals/an-object');
|
|
3
4
|
var aFunction = require('../internals/a-function');
|
|
4
5
|
var bind = require('../internals/bind-context');
|
|
5
6
|
var speciesConstructor = require('../internals/species-constructor');
|
|
6
7
|
var getMapIterator = require('../internals/get-map-iterator');
|
|
7
|
-
var Map = require('../internals/path').Map;
|
|
8
8
|
|
|
9
9
|
// `Map.prototype.mapValues` method
|
|
10
|
-
// https://github.com/tc39/collection-methods
|
|
10
|
+
// https://github.com/tc39/proposal-collection-methods
|
|
11
11
|
require('../internals/export')({ target: 'Map', proto: true, real: true, forced: require('../internals/is-pure') }, {
|
|
12
12
|
mapValues: function mapValues(callbackfn /* , thisArg */) {
|
|
13
13
|
var map = anObject(this);
|
|
14
14
|
var iterator = getMapIterator(map);
|
|
15
15
|
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
|
|
16
|
-
var newMap = new (speciesConstructor(map, Map))();
|
|
16
|
+
var newMap = new (speciesConstructor(map, getBuiltIn('Map')))();
|
|
17
17
|
var setter = aFunction(newMap.set);
|
|
18
18
|
var step, entry, key;
|
|
19
19
|
while (!(step = iterator.next()).done) {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var anObject = require('../internals/an-object');
|
|
3
3
|
var aFunction = require('../internals/a-function');
|
|
4
|
-
var speciesConstructor = require('../internals/species-constructor');
|
|
5
|
-
var Map = require('../internals/path').Map;
|
|
6
4
|
var iterate = require('../internals/iterate');
|
|
7
5
|
|
|
8
6
|
// `Map.prototype.merge` method
|
|
9
|
-
// https://github.com/tc39/collection-methods
|
|
7
|
+
// https://github.com/tc39/proposal-collection-methods
|
|
10
8
|
require('../internals/export')({ target: 'Map', proto: true, real: true, forced: require('../internals/is-pure') }, {
|
|
11
|
-
|
|
9
|
+
// eslint-disable-next-line no-unused-vars
|
|
10
|
+
merge: function merge(iterable /* ...iterbles */) {
|
|
12
11
|
var map = anObject(this);
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
var setter = aFunction(map.set);
|
|
13
|
+
var i = 0;
|
|
14
|
+
while (i < arguments.length) {
|
|
15
|
+
iterate(arguments[i++], setter, map, true);
|
|
16
|
+
}
|
|
17
|
+
return map;
|
|
18
18
|
}
|
|
19
19
|
});
|
package/modules/esnext.map.of.js
CHANGED
|
@@ -4,7 +4,7 @@ var aFunction = require('../internals/a-function');
|
|
|
4
4
|
var getMapIterator = require('../internals/get-map-iterator');
|
|
5
5
|
|
|
6
6
|
// `Map.prototype.reduce` method
|
|
7
|
-
// https://github.com/tc39/collection-methods
|
|
7
|
+
// https://github.com/tc39/proposal-collection-methods
|
|
8
8
|
require('../internals/export')({ target: 'Map', proto: true, real: true, forced: require('../internals/is-pure') }, {
|
|
9
9
|
reduce: function reduce(callbackfn /* , initialValue */) {
|
|
10
10
|
var map = anObject(this);
|
|
@@ -14,7 +14,7 @@ require('../internals/export')({ target: 'Map', proto: true, real: true, forced:
|
|
|
14
14
|
if (arguments.length > 1) accumulator = arguments[1];
|
|
15
15
|
else {
|
|
16
16
|
step = iterator.next();
|
|
17
|
-
if (step.done) throw TypeError('Reduce of empty map with no initial value
|
|
17
|
+
if (step.done) throw TypeError('Reduce of empty map with no initial value');
|
|
18
18
|
accumulator = step.value[1];
|
|
19
19
|
}
|
|
20
20
|
while (!(step = iterator.next()).done) {
|
|
@@ -4,7 +4,7 @@ var bind = require('../internals/bind-context');
|
|
|
4
4
|
var getMapIterator = require('../internals/get-map-iterator');
|
|
5
5
|
|
|
6
6
|
// `Set.prototype.some` method
|
|
7
|
-
// https://github.com/tc39/collection-methods
|
|
7
|
+
// https://github.com/tc39/proposal-collection-methods
|
|
8
8
|
require('../internals/export')({ target: 'Map', proto: true, real: true, forced: require('../internals/is-pure') }, {
|
|
9
9
|
some: function some(callbackfn /* , thisArg */) {
|
|
10
10
|
var map = anObject(this);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var anObject = require('../internals/an-object');
|
|
3
|
+
var aFunction = require('../internals/a-function');
|
|
4
|
+
|
|
5
|
+
// `Set.prototype.update` method
|
|
6
|
+
// https://github.com/tc39/proposal-collection-methods
|
|
7
|
+
require('../internals/export')({ target: 'Map', proto: true, real: true, forced: require('../internals/is-pure') }, {
|
|
8
|
+
update: function update(key, callback /* , thunk */) {
|
|
9
|
+
var map = anObject(this);
|
|
10
|
+
aFunction(callback);
|
|
11
|
+
var isPresentInMap = map.has(key);
|
|
12
|
+
if (!isPresentInMap && arguments.length < 3) {
|
|
13
|
+
throw TypeError('Updating absent value');
|
|
14
|
+
}
|
|
15
|
+
var value = isPresentInMap ? map.get(key) : aFunction(arguments[2])(key, map);
|
|
16
|
+
map.set(key, callback(value, key, map));
|
|
17
|
+
return map;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var toInteger = require('../internals/to-integer');
|
|
3
3
|
var parseInt = require('../internals/parse-int');
|
|
4
|
-
var INVALID_NUMBER_REPRESENTATION = 'Invalid number representation
|
|
5
|
-
var INVALID_RADIX = 'Invalid radix
|
|
4
|
+
var INVALID_NUMBER_REPRESENTATION = 'Invalid number representation';
|
|
5
|
+
var INVALID_RADIX = 'Invalid radix';
|
|
6
6
|
var valid = /^[0-9a-z]+$/;
|
|
7
7
|
|
|
8
8
|
// `Number.fromString` method
|
|
9
|
-
// https://github.com/
|
|
9
|
+
// https://github.com/tc39/proposal-number-fromstring
|
|
10
10
|
require('../internals/export')({ target: 'Number', stat: true }, {
|
|
11
11
|
fromString: function fromString(string, radix) {
|
|
12
12
|
var sign = 1;
|
|
13
13
|
var R, mathNum;
|
|
14
|
-
if (typeof string != 'string') throw
|
|
15
|
-
if (!string.length) throw
|
|
14
|
+
if (typeof string != 'string') throw TypeError(INVALID_NUMBER_REPRESENTATION);
|
|
15
|
+
if (!string.length) throw SyntaxError(INVALID_NUMBER_REPRESENTATION);
|
|
16
16
|
if (string.charAt(0) == '-') {
|
|
17
17
|
sign = -1;
|
|
18
18
|
string = string.slice(1);
|
|
19
|
-
if (!string.length) throw
|
|
19
|
+
if (!string.length) throw SyntaxError(INVALID_NUMBER_REPRESENTATION);
|
|
20
20
|
}
|
|
21
21
|
R = radix === undefined ? 10 : toInteger(radix);
|
|
22
|
-
if (R < 2 || R > 36) throw
|
|
22
|
+
if (R < 2 || R > 36) throw RangeError(INVALID_RADIX);
|
|
23
23
|
if (!valid.test(string) || (mathNum = parseInt(string, R)).toString(R) !== string) {
|
|
24
|
-
throw
|
|
24
|
+
throw SyntaxError(INVALID_NUMBER_REPRESENTATION);
|
|
25
25
|
}
|
|
26
26
|
return sign * mathNum;
|
|
27
27
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
// `Promise.allSettled` method
|
|
3
|
-
// https://github.com/
|
|
3
|
+
// https://github.com/tc39/proposal-promise-allSettled
|
|
4
4
|
var newPromiseCapabilityModule = require('../internals/new-promise-capability');
|
|
5
5
|
var perform = require('../internals/perform');
|
|
6
6
|
var iterate = require('../internals/iterate');
|
|
@@ -23,12 +23,12 @@ require('../internals/export')({ target: 'Promise', stat: true }, {
|
|
|
23
23
|
C.resolve(promise).then(function (value) {
|
|
24
24
|
if (alreadyCalled) return;
|
|
25
25
|
alreadyCalled = true;
|
|
26
|
-
values[index] = {
|
|
26
|
+
values[index] = { status: 'fulfilled', value: value };
|
|
27
27
|
--remaining || resolve(values);
|
|
28
28
|
}, function (e) {
|
|
29
29
|
if (alreadyCalled) return;
|
|
30
30
|
alreadyCalled = true;
|
|
31
|
-
values[index] = {
|
|
31
|
+
values[index] = { status: 'rejected', reason: e };
|
|
32
32
|
--remaining || resolve(values);
|
|
33
33
|
});
|
|
34
34
|
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
// `Promise.any` method
|
|
3
|
+
// https://github.com/tc39/proposal-promise-any
|
|
4
|
+
var getBuiltIn = require('../internals/get-built-in');
|
|
5
|
+
var newPromiseCapabilityModule = require('../internals/new-promise-capability');
|
|
6
|
+
var perform = require('../internals/perform');
|
|
7
|
+
var iterate = require('../internals/iterate');
|
|
8
|
+
var PROMISE_ANY_ERROR = 'No one promise resolved';
|
|
9
|
+
|
|
10
|
+
require('../internals/export')({ target: 'Promise', stat: true }, {
|
|
11
|
+
any: function any(iterable) {
|
|
12
|
+
var C = this;
|
|
13
|
+
var capability = newPromiseCapabilityModule.f(C);
|
|
14
|
+
var resolve = capability.resolve;
|
|
15
|
+
var reject = capability.reject;
|
|
16
|
+
var result = perform(function () {
|
|
17
|
+
var errors = [];
|
|
18
|
+
var counter = 0;
|
|
19
|
+
var remaining = 1;
|
|
20
|
+
var alreadyResolved = false;
|
|
21
|
+
iterate(iterable, function (promise) {
|
|
22
|
+
var index = counter++;
|
|
23
|
+
var alreadyRejected = false;
|
|
24
|
+
errors.push(undefined);
|
|
25
|
+
remaining++;
|
|
26
|
+
C.resolve(promise).then(function (value) {
|
|
27
|
+
if (alreadyRejected || alreadyResolved) return;
|
|
28
|
+
alreadyResolved = true;
|
|
29
|
+
resolve(value);
|
|
30
|
+
}, function (e) {
|
|
31
|
+
if (alreadyRejected || alreadyResolved) return;
|
|
32
|
+
alreadyRejected = true;
|
|
33
|
+
errors[index] = e;
|
|
34
|
+
--remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR));
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
--remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR));
|
|
38
|
+
});
|
|
39
|
+
if (result.e) reject(result.v);
|
|
40
|
+
return capability.promise;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
var ReflectMetadataModule = require('../internals/reflect-metadata');
|
|
2
2
|
var anObject = require('../internals/an-object');
|
|
3
|
-
var
|
|
3
|
+
var toMetadataKey = ReflectMetadataModule.toKey;
|
|
4
4
|
var ordinaryDefineOwnMetadata = ReflectMetadataModule.set;
|
|
5
5
|
|
|
6
6
|
// `Reflect.defineMetadata` method
|
|
7
7
|
// https://github.com/rbuckton/reflect-metadata
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
require('../internals/export')({ target: 'Reflect', stat: true }, {
|
|
9
|
+
defineMetadata: function defineMetadata(metadataKey, metadataValue, target /* , targetKey */) {
|
|
10
|
+
var targetKey = arguments.length < 4 ? undefined : toMetadataKey(arguments[3]);
|
|
11
|
+
ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), targetKey);
|
|
12
|
+
}
|
|
13
|
+
});
|