core-js 3.15.2 → 3.16.3
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/README.md +1 -1
- package/es/aggregate-error.js +1 -1
- package/es/array/entries.js +1 -0
- package/es/array/index.js +2 -1
- package/es/array/iterator.js +1 -0
- package/es/array/keys.js +1 -0
- package/es/array/values.js +1 -0
- package/es/array/virtual/entries.js +1 -0
- package/es/array/virtual/index.js +1 -0
- package/es/array/virtual/iterator.js +1 -0
- package/es/array/virtual/keys.js +1 -0
- package/es/array/virtual/values.js +1 -0
- package/es/escape.js +2 -2
- package/es/get-iterator-method.js +5 -0
- package/es/get-iterator.js +5 -0
- package/es/is-iterable.js +5 -0
- package/es/map/index.js +1 -1
- package/es/promise/all-settled.js +2 -1
- package/es/promise/any.js +2 -1
- package/es/promise/finally.js +1 -0
- package/es/promise/index.js +1 -1
- package/es/reflect/index.js +1 -0
- package/es/reflect/to-string-tag.js +1 -0
- package/es/regexp/constructor.js +3 -0
- package/es/regexp/match.js +1 -0
- package/es/regexp/replace.js +1 -0
- package/es/regexp/search.js +1 -0
- package/es/regexp/split.js +1 -0
- package/es/set/index.js +2 -2
- package/es/string/index.js +1 -0
- package/es/string/iterator.js +1 -0
- package/es/string/match-all.js +2 -0
- package/es/string/replace-all.js +2 -0
- package/es/string/virtual/index.js +2 -0
- package/es/string/virtual/iterator.js +1 -0
- package/es/string/virtual/match-all.js +2 -0
- package/es/string/virtual/replace-all.js +2 -0
- package/es/symbol/is-concat-spreadable.js +1 -1
- package/es/symbol/iterator.js +3 -2
- package/es/symbol/match-all.js +2 -0
- package/es/symbol/match.js +1 -0
- package/es/symbol/replace.js +1 -0
- package/es/symbol/search.js +1 -0
- package/es/symbol/split.js +1 -0
- package/es/symbol/to-primitive.js +1 -0
- package/es/symbol/to-string-tag.js +2 -2
- package/es/typed-array/entries.js +1 -0
- package/es/typed-array/iterator.js +1 -0
- package/es/typed-array/keys.js +1 -0
- package/es/typed-array/methods.js +2 -1
- package/es/typed-array/values.js +1 -0
- package/es/unescape.js +2 -2
- package/es/weak-map/index.js +1 -1
- package/es/weak-set/index.js +1 -1
- package/features/array/concat.js +1 -1
- package/features/array/copy-within.js +1 -1
- package/features/array/entries.js +1 -1
- package/features/array/every.js +1 -1
- package/features/array/fill.js +1 -1
- package/features/array/filter-out.js +1 -0
- package/features/array/filter-reject.js +4 -0
- package/features/array/filter.js +1 -1
- package/features/array/find-index.js +1 -1
- package/features/array/find.js +1 -1
- package/features/array/flat-map.js +1 -1
- package/features/array/flat.js +1 -1
- package/features/array/for-each.js +1 -1
- package/features/array/from.js +1 -1
- package/features/array/group-by.js +4 -0
- package/features/array/includes.js +1 -1
- package/features/array/index-of.js +1 -1
- package/features/array/index.js +4 -1
- package/features/array/is-array.js +1 -1
- package/features/array/iterator.js +1 -1
- package/features/array/join.js +1 -1
- package/features/array/keys.js +1 -1
- package/features/array/last-index-of.js +1 -1
- package/features/array/map.js +1 -1
- package/features/array/of.js +1 -1
- package/features/array/reduce-right.js +1 -1
- package/features/array/reduce.js +1 -1
- package/features/array/reverse.js +1 -1
- package/features/array/slice.js +1 -1
- package/features/array/some.js +1 -1
- package/features/array/sort.js +1 -1
- package/features/array/splice.js +1 -1
- package/features/array/values.js +1 -1
- package/features/array/virtual/concat.js +1 -1
- package/features/array/virtual/copy-within.js +1 -1
- package/features/array/virtual/entries.js +1 -1
- package/features/array/virtual/every.js +1 -1
- package/features/array/virtual/fill.js +1 -1
- package/features/array/virtual/filter-out.js +1 -0
- package/features/array/virtual/filter-reject.js +4 -0
- package/features/array/virtual/filter.js +1 -1
- package/features/array/virtual/find-index.js +1 -1
- package/features/array/virtual/find.js +1 -1
- package/features/array/virtual/flat-map.js +1 -1
- package/features/array/virtual/flat.js +1 -1
- package/features/array/virtual/for-each.js +1 -1
- package/features/array/virtual/group-by.js +4 -0
- package/features/array/virtual/includes.js +1 -1
- package/features/array/virtual/index-of.js +1 -1
- package/features/array/virtual/index.js +4 -1
- package/features/array/virtual/iterator.js +1 -1
- package/features/array/virtual/join.js +1 -1
- package/features/array/virtual/keys.js +1 -1
- package/features/array/virtual/last-index-of.js +1 -1
- package/features/array/virtual/map.js +1 -1
- package/features/array/virtual/reduce-right.js +1 -1
- package/features/array/virtual/reduce.js +1 -1
- package/features/array/virtual/reverse.js +1 -1
- package/features/array/virtual/slice.js +1 -1
- package/features/array/virtual/some.js +1 -1
- package/features/array/virtual/sort.js +1 -1
- package/features/array/virtual/splice.js +1 -1
- package/features/array/virtual/values.js +1 -1
- package/features/array-buffer/constructor.js +1 -1
- package/features/array-buffer/index.js +1 -1
- package/features/array-buffer/is-view.js +1 -1
- package/features/array-buffer/slice.js +1 -1
- package/features/async-iterator/as-indexed-pairs.js +0 -2
- package/features/async-iterator/drop.js +0 -2
- package/features/async-iterator/every.js +0 -2
- package/features/async-iterator/filter.js +0 -2
- package/features/async-iterator/find.js +0 -2
- package/features/async-iterator/flat-map.js +0 -2
- package/features/async-iterator/for-each.js +0 -2
- package/features/async-iterator/from.js +1 -0
- package/features/async-iterator/index.js +1 -0
- package/features/async-iterator/map.js +0 -2
- package/features/async-iterator/reduce.js +0 -2
- package/features/async-iterator/some.js +0 -2
- package/features/async-iterator/take.js +0 -2
- package/features/async-iterator/to-array.js +0 -2
- package/features/data-view/index.js +1 -1
- package/features/date/index.js +1 -1
- package/features/date/now.js +1 -1
- package/features/date/to-iso-string.js +1 -1
- package/features/date/to-json.js +1 -1
- package/features/date/to-primitive.js +1 -1
- package/features/date/to-string.js +1 -1
- package/features/function/bind.js +1 -1
- package/features/function/has-instance.js +1 -1
- package/features/function/index.js +1 -1
- package/features/function/name.js +1 -1
- package/features/function/virtual/bind.js +1 -1
- package/features/function/virtual/index.js +1 -1
- package/features/get-iterator-method.js +2 -4
- package/features/get-iterator.js +2 -4
- package/features/global-this.js +1 -1
- package/features/index.js +4 -0
- package/features/instance/bind.js +1 -1
- package/features/instance/code-point-at.js +1 -1
- package/features/instance/concat.js +1 -1
- package/features/instance/copy-within.js +1 -1
- package/features/instance/ends-with.js +1 -1
- package/features/instance/every.js +1 -1
- package/features/instance/fill.js +1 -1
- package/features/instance/filter-out.js +1 -0
- package/features/instance/filter-reject.js +8 -0
- package/features/instance/filter.js +1 -1
- package/features/instance/find-index.js +1 -1
- package/features/instance/find.js +1 -1
- package/features/instance/flags.js +1 -1
- package/features/instance/flat-map.js +1 -1
- package/features/instance/flat.js +1 -1
- package/features/instance/group-by.js +8 -0
- package/features/instance/includes.js +1 -1
- package/features/instance/index-of.js +1 -1
- package/features/instance/last-index-of.js +1 -1
- package/features/instance/map.js +1 -1
- package/features/instance/match-all.js +1 -1
- package/features/instance/pad-end.js +1 -1
- package/features/instance/pad-start.js +1 -1
- package/features/instance/reduce-right.js +1 -1
- package/features/instance/reduce.js +1 -1
- package/features/instance/repeat.js +1 -1
- package/features/instance/reverse.js +1 -1
- package/features/instance/slice.js +1 -1
- package/features/instance/some.js +1 -1
- package/features/instance/sort.js +1 -1
- package/features/instance/splice.js +1 -1
- package/features/instance/starts-with.js +1 -1
- package/features/instance/trim-end.js +1 -1
- package/features/instance/trim-left.js +1 -1
- package/features/instance/trim-right.js +1 -1
- package/features/instance/trim-start.js +1 -1
- package/features/instance/trim.js +1 -1
- package/features/is-iterable.js +2 -4
- package/features/iterator/as-indexed-pairs.js +0 -2
- package/features/iterator/drop.js +0 -2
- package/features/iterator/every.js +0 -2
- package/features/iterator/filter.js +0 -2
- package/features/iterator/find.js +0 -2
- package/features/iterator/flat-map.js +0 -2
- package/features/iterator/for-each.js +0 -2
- package/features/iterator/from.js +1 -0
- package/features/iterator/index.js +1 -0
- package/features/iterator/map.js +0 -2
- package/features/iterator/reduce.js +0 -2
- package/features/iterator/some.js +0 -2
- package/features/iterator/take.js +0 -2
- package/features/iterator/to-array.js +0 -2
- package/features/json/index.js +1 -1
- package/features/json/stringify.js +1 -1
- package/features/json/to-string-tag.js +1 -1
- package/features/map/from.js +1 -0
- package/features/map/index.js +1 -1
- package/features/map/of.js +1 -2
- package/features/math/acosh.js +1 -1
- package/features/math/asinh.js +1 -1
- package/features/math/atanh.js +1 -1
- package/features/math/cbrt.js +1 -1
- package/features/math/clz32.js +1 -1
- package/features/math/cosh.js +1 -1
- package/features/math/expm1.js +1 -1
- package/features/math/fround.js +1 -1
- package/features/math/hypot.js +1 -1
- package/features/math/imul.js +1 -1
- package/features/math/index.js +1 -1
- package/features/math/log10.js +1 -1
- package/features/math/log1p.js +1 -1
- package/features/math/log2.js +1 -1
- package/features/math/sign.js +1 -1
- package/features/math/sinh.js +1 -1
- package/features/math/tanh.js +1 -1
- package/features/math/to-string-tag.js +1 -1
- package/features/math/trunc.js +1 -1
- package/features/number/constructor.js +1 -1
- package/features/number/epsilon.js +1 -1
- package/features/number/index.js +1 -1
- package/features/number/is-finite.js +1 -1
- package/features/number/is-integer.js +1 -1
- package/features/number/is-nan.js +1 -1
- package/features/number/is-safe-integer.js +1 -1
- package/features/number/max-safe-integer.js +1 -1
- package/features/number/min-safe-integer.js +1 -1
- package/features/number/parse-float.js +1 -1
- package/features/number/parse-int.js +1 -1
- package/features/number/range.js +1 -0
- package/features/number/to-fixed.js +1 -1
- package/features/number/to-precision.js +1 -1
- package/features/number/virtual/index.js +1 -1
- package/features/number/virtual/to-fixed.js +1 -1
- package/features/number/virtual/to-precision.js +1 -1
- package/features/object/assign.js +1 -1
- package/features/object/create.js +1 -1
- package/features/object/define-getter.js +1 -1
- package/features/object/define-properties.js +1 -1
- package/features/object/define-property.js +1 -1
- package/features/object/define-setter.js +1 -1
- package/features/object/entries.js +1 -1
- package/features/object/freeze.js +1 -1
- package/features/object/from-entries.js +1 -1
- package/features/object/get-own-property-descriptor.js +1 -1
- package/features/object/get-own-property-descriptors.js +1 -1
- package/features/object/get-own-property-names.js +1 -1
- package/features/object/get-own-property-symbols.js +1 -1
- package/features/object/get-prototype-of.js +1 -1
- package/features/object/index.js +1 -1
- package/features/object/is-extensible.js +1 -1
- package/features/object/is-frozen.js +1 -1
- package/features/object/is-sealed.js +1 -1
- package/features/object/is.js +1 -1
- package/features/object/keys.js +1 -1
- package/features/object/lookup-getter.js +1 -1
- package/features/object/lookup-setter.js +1 -1
- package/features/object/prevent-extensions.js +1 -1
- package/features/object/seal.js +1 -1
- package/features/object/set-prototype-of.js +1 -1
- package/features/object/to-string.js +1 -1
- package/features/object/values.js +1 -1
- package/features/parse-float.js +1 -1
- package/features/parse-int.js +1 -1
- package/features/promise/all-settled.js +1 -1
- package/features/promise/any.js +1 -1
- package/features/promise/finally.js +1 -1
- package/features/promise/index.js +1 -1
- package/features/reflect/apply.js +1 -1
- package/features/reflect/construct.js +1 -1
- package/features/reflect/define-property.js +1 -1
- package/features/reflect/delete-property.js +1 -1
- package/features/reflect/get-own-property-descriptor.js +1 -1
- package/features/reflect/get-prototype-of.js +1 -1
- package/features/reflect/get.js +1 -1
- package/features/reflect/has.js +1 -1
- package/features/reflect/index.js +1 -1
- package/features/reflect/is-extensible.js +1 -1
- package/features/reflect/own-keys.js +1 -1
- package/features/reflect/prevent-extensions.js +1 -1
- package/features/reflect/set-prototype-of.js +1 -1
- package/features/reflect/set.js +1 -1
- package/features/regexp/constructor.js +1 -1
- package/features/regexp/flags.js +1 -1
- package/features/regexp/index.js +1 -1
- package/features/regexp/match.js +1 -1
- package/features/regexp/replace.js +1 -1
- package/features/regexp/search.js +1 -1
- package/features/regexp/split.js +1 -1
- package/features/regexp/sticky.js +1 -1
- package/features/regexp/test.js +1 -1
- package/features/regexp/to-string.js +1 -1
- package/features/set/difference.js +1 -0
- package/features/set/from.js +1 -0
- package/features/set/index.js +1 -1
- package/features/set/intersection.js +3 -0
- package/features/set/is-disjoint-from.js +3 -0
- package/features/set/is-subset-of.js +1 -0
- package/features/set/is-superset-of.js +3 -0
- package/features/set/of.js +1 -2
- package/features/set/symmetric-difference.js +1 -0
- package/features/set/union.js +1 -0
- package/features/string/anchor.js +1 -1
- package/features/string/big.js +1 -1
- package/features/string/blink.js +1 -1
- package/features/string/bold.js +1 -1
- package/features/string/code-point-at.js +1 -1
- package/features/string/code-points.js +1 -0
- package/features/string/ends-with.js +1 -1
- package/features/string/fixed.js +1 -1
- package/features/string/fontcolor.js +1 -1
- package/features/string/fontsize.js +1 -1
- package/features/string/from-code-point.js +1 -1
- package/features/string/includes.js +1 -1
- package/features/string/index.js +1 -1
- package/features/string/italics.js +1 -1
- package/features/string/iterator.js +1 -1
- package/features/string/link.js +1 -1
- package/features/string/match-all.js +1 -1
- package/features/string/match.js +1 -1
- package/features/string/pad-end.js +1 -1
- package/features/string/pad-start.js +1 -1
- package/features/string/raw.js +1 -1
- package/features/string/repeat.js +1 -1
- package/features/string/replace-all.js +1 -1
- package/features/string/replace.js +1 -1
- package/features/string/search.js +1 -1
- package/features/string/small.js +1 -1
- package/features/string/split.js +1 -1
- package/features/string/starts-with.js +1 -1
- package/features/string/strike.js +1 -1
- package/features/string/sub.js +1 -1
- package/features/string/sup.js +1 -1
- package/features/string/trim-end.js +1 -1
- package/features/string/trim-left.js +1 -1
- package/features/string/trim-right.js +1 -1
- package/features/string/trim-start.js +1 -1
- package/features/string/trim.js +1 -1
- package/features/string/virtual/anchor.js +1 -1
- package/features/string/virtual/big.js +1 -1
- package/features/string/virtual/blink.js +1 -1
- package/features/string/virtual/bold.js +1 -1
- package/features/string/virtual/code-point-at.js +1 -1
- package/features/string/virtual/code-points.js +1 -0
- package/features/string/virtual/ends-with.js +1 -1
- package/features/string/virtual/fixed.js +1 -1
- package/features/string/virtual/fontcolor.js +1 -1
- package/features/string/virtual/fontsize.js +1 -1
- package/features/string/virtual/includes.js +1 -1
- package/features/string/virtual/index.js +1 -1
- package/features/string/virtual/italics.js +1 -1
- package/features/string/virtual/iterator.js +1 -1
- package/features/string/virtual/link.js +1 -1
- package/features/string/virtual/match-all.js +1 -1
- package/features/string/virtual/pad-end.js +1 -1
- package/features/string/virtual/pad-start.js +1 -1
- package/features/string/virtual/repeat.js +1 -1
- package/features/string/virtual/replace-all.js +1 -1
- package/features/string/virtual/small.js +1 -1
- package/features/string/virtual/starts-with.js +1 -1
- package/features/string/virtual/strike.js +1 -1
- package/features/string/virtual/sub.js +1 -1
- package/features/string/virtual/sup.js +1 -1
- package/features/string/virtual/trim-end.js +1 -1
- package/features/string/virtual/trim-left.js +1 -1
- package/features/string/virtual/trim-right.js +1 -1
- package/features/string/virtual/trim-start.js +1 -1
- package/features/string/virtual/trim.js +1 -1
- package/features/symbol/async-iterator.js +1 -1
- package/features/symbol/for.js +1 -1
- package/features/symbol/has-instance.js +1 -1
- package/features/symbol/index.js +1 -1
- package/features/symbol/is-concat-spreadable.js +1 -1
- package/features/symbol/iterator.js +1 -1
- package/features/symbol/key-for.js +1 -1
- package/features/symbol/match-all.js +1 -1
- package/features/symbol/match.js +1 -1
- package/features/symbol/replace.js +1 -1
- package/features/symbol/search.js +1 -1
- package/features/symbol/species.js +1 -1
- package/features/symbol/split.js +1 -1
- package/features/symbol/to-primitive.js +1 -1
- package/features/symbol/to-string-tag.js +1 -1
- package/features/symbol/unscopables.js +1 -1
- package/features/typed-array/copy-within.js +3 -1
- package/features/typed-array/entries.js +3 -1
- package/features/typed-array/every.js +3 -1
- package/features/typed-array/fill.js +3 -1
- package/features/typed-array/filter-out.js +1 -0
- package/features/typed-array/filter-reject.js +1 -0
- package/features/typed-array/filter.js +3 -1
- package/features/typed-array/find-index.js +3 -1
- package/features/typed-array/find.js +3 -1
- package/features/typed-array/float32-array.js +2 -1
- package/features/typed-array/float64-array.js +2 -1
- package/features/typed-array/for-each.js +3 -1
- package/features/typed-array/from.js +3 -1
- package/features/typed-array/group-by.js +1 -0
- package/features/typed-array/includes.js +3 -1
- package/features/typed-array/index-of.js +3 -1
- package/features/typed-array/index.js +4 -1
- package/features/typed-array/int16-array.js +2 -1
- package/features/typed-array/int32-array.js +2 -1
- package/features/typed-array/int8-array.js +2 -1
- package/features/typed-array/iterator.js +3 -1
- package/features/typed-array/join.js +3 -1
- package/features/typed-array/keys.js +3 -1
- package/features/typed-array/last-index-of.js +3 -1
- package/features/typed-array/map.js +3 -1
- package/features/typed-array/methods.js +12 -0
- package/features/typed-array/of.js +3 -1
- package/features/typed-array/reduce-right.js +3 -1
- package/features/typed-array/reduce.js +3 -1
- package/features/typed-array/reverse.js +3 -1
- package/features/typed-array/set.js +3 -1
- package/features/typed-array/slice.js +3 -1
- package/features/typed-array/some.js +3 -1
- package/features/typed-array/sort.js +3 -1
- package/features/typed-array/subarray.js +3 -1
- package/features/typed-array/to-locale-string.js +3 -1
- package/features/typed-array/to-string.js +3 -1
- package/features/typed-array/uint16-array.js +2 -1
- package/features/typed-array/uint32-array.js +2 -1
- package/features/typed-array/uint8-array.js +2 -1
- package/features/typed-array/uint8-clamped-array.js +2 -1
- package/features/typed-array/values.js +3 -1
- package/features/weak-map/from.js +1 -0
- package/features/weak-map/index.js +2 -1
- package/features/weak-map/of.js +1 -2
- package/features/weak-set/from.js +1 -0
- package/features/weak-set/index.js +2 -1
- package/features/weak-set/of.js +1 -2
- package/internals/array-buffer-view-core.js +16 -10
- package/internals/array-from-constructor-and-list.js +7 -0
- package/internals/array-group-by.js +33 -0
- package/internals/array-iteration-from-last.js +6 -6
- package/internals/array-iteration.js +6 -6
- package/internals/array-species-constructor.js +20 -0
- package/internals/array-species-create.js +2 -15
- package/internals/async-iterator-create-proxy.js +2 -1
- package/internals/collection.js +1 -1
- package/internals/create-html.js +3 -2
- package/internals/create-property.js +2 -2
- package/internals/date-to-primitive.js +5 -4
- package/internals/engine-is-ios-pebble.js +4 -0
- package/internals/engine-is-ios.js +1 -1
- package/internals/engine-v8-version.js +2 -1
- package/internals/get-built-in.js +1 -3
- package/internals/get-map-iterator.js +1 -4
- package/internals/get-set-iterator.js +1 -4
- package/internals/internal-metadata.js +32 -2
- package/internals/is-data-descriptor.js +5 -0
- package/internals/is-symbol.js +9 -0
- package/internals/microtask.js +2 -1
- package/internals/number-parse-float.js +2 -1
- package/internals/number-parse-int.js +2 -1
- package/internals/object-create.js +7 -3
- package/internals/object-define-property.js +2 -2
- package/internals/object-get-own-property-descriptor.js +2 -2
- package/internals/ordinary-to-primitive.js +11 -0
- package/internals/regexp-exec.js +6 -4
- package/internals/regexp-sticky-helpers.js +5 -6
- package/internals/regexp-unsupported-dot-all.js +5 -2
- package/internals/regexp-unsupported-ncg.js +5 -2
- package/internals/set-global.js +2 -2
- package/internals/shared.js +1 -1
- package/internals/string-multibyte.js +3 -2
- package/internals/string-pad.js +3 -2
- package/internals/string-repeat.js +2 -1
- package/internals/string-trim.js +2 -1
- package/internals/task.js +9 -4
- package/internals/to-primitive.js +17 -9
- package/internals/to-property-key.js +9 -0
- package/internals/to-string.js +6 -0
- package/internals/typed-array-constructor.js +13 -5
- package/internals/typed-array-from-species-and-list.js +3 -8
- package/internals/typed-array-species-constructor.js +11 -0
- package/modules/es.aggregate-error.js +2 -1
- package/modules/es.array.sort.js +2 -1
- package/modules/es.date.get-year.js +6 -1
- package/modules/es.date.to-json.js +1 -1
- package/modules/es.date.to-string.js +1 -1
- package/modules/es.escape.js +2 -1
- package/modules/es.number.constructor.js +3 -1
- package/modules/es.object.lookup-getter.js +2 -2
- package/modules/es.object.lookup-setter.js +2 -2
- package/modules/es.reflect.define-property.js +2 -2
- package/modules/es.reflect.get.js +4 -5
- package/modules/es.reflect.set.js +8 -6
- package/modules/es.regexp.constructor.js +3 -2
- package/modules/es.regexp.to-string.js +3 -2
- package/modules/es.string.ends-with.js +3 -2
- package/modules/es.string.includes.js +3 -2
- package/modules/es.string.iterator.js +2 -1
- package/modules/es.string.match-all.js +6 -5
- package/modules/es.string.match.js +7 -6
- package/modules/es.string.raw.js +3 -2
- package/modules/es.string.replace-all.js +7 -6
- package/modules/es.string.replace.js +12 -10
- package/modules/es.string.search.js +6 -5
- package/modules/es.string.split.js +8 -6
- package/modules/es.string.starts-with.js +3 -2
- package/modules/es.string.substr.js +2 -1
- package/modules/es.symbol.js +8 -13
- package/modules/es.typed-array.map.js +2 -3
- package/modules/es.typed-array.slice.js +3 -4
- package/modules/es.typed-array.subarray.js +3 -2
- package/modules/es.unescape.js +2 -1
- package/modules/es.weak-map.js +1 -1
- package/modules/esnext.array.filter-out.js +3 -2
- package/modules/esnext.array.filter-reject.js +14 -0
- package/modules/esnext.array.group-by.js +16 -0
- package/modules/esnext.async-iterator.as-indexed-pairs.js +1 -1
- package/modules/esnext.async-iterator.drop.js +1 -1
- package/modules/esnext.async-iterator.filter.js +1 -1
- package/modules/esnext.async-iterator.flat-map.js +1 -1
- package/modules/esnext.async-iterator.from.js +6 -2
- package/modules/esnext.async-iterator.map.js +1 -1
- package/modules/esnext.async-iterator.take.js +1 -1
- package/modules/esnext.map.merge.js +2 -1
- package/modules/esnext.string.at-alternative.js +3 -2
- package/modules/esnext.string.code-points.js +2 -1
- package/modules/esnext.typed-array.filter-out.js +3 -2
- package/modules/esnext.typed-array.filter-reject.js +14 -0
- package/modules/esnext.typed-array.group-by.js +14 -0
- package/modules/web.url-search-params.js +56 -36
- package/modules/web.url.js +14 -13
- package/package.json +3 -4
- package/postinstall.js +4 -3
- package/proposals/array-filtering.js +4 -0
- package/proposals/array-grouping.js +3 -0
- package/stable/aggregate-error.js +1 -0
- package/stable/dom-collections/index.js +1 -0
- package/stable/dom-collections/iterator.js +1 -0
- package/stable/get-iterator-method.js +4 -0
- package/stable/get-iterator.js +4 -0
- package/stable/is-iterable.js +4 -0
- package/stable/map/index.js +1 -0
- package/stable/object/from-entries.js +1 -0
- package/stable/object/index.js +1 -0
- package/stable/promise/all-settled.js +1 -0
- package/stable/promise/any.js +1 -0
- package/stable/promise/index.js +1 -0
- package/stable/set/index.js +1 -0
- package/stable/symbol/index.js +1 -0
- package/stable/symbol/iterator.js +1 -0
- package/stable/typed-array/copy-within.js +3 -1
- package/stable/typed-array/entries.js +3 -1
- package/stable/typed-array/every.js +3 -1
- package/stable/typed-array/fill.js +3 -1
- package/stable/typed-array/filter.js +3 -1
- package/stable/typed-array/find-index.js +3 -1
- package/stable/typed-array/find.js +3 -1
- 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 +3 -1
- package/stable/typed-array/from.js +3 -1
- package/stable/typed-array/includes.js +3 -1
- package/stable/typed-array/index-of.js +3 -1
- 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 +3 -1
- package/stable/typed-array/join.js +3 -1
- package/stable/typed-array/keys.js +3 -1
- package/stable/typed-array/last-index-of.js +3 -1
- package/stable/typed-array/map.js +3 -1
- package/stable/typed-array/methods.js +3 -0
- package/stable/typed-array/of.js +3 -1
- package/stable/typed-array/reduce-right.js +3 -1
- package/stable/typed-array/reduce.js +3 -1
- package/stable/typed-array/reverse.js +3 -1
- package/stable/typed-array/set.js +3 -1
- package/stable/typed-array/slice.js +3 -1
- package/stable/typed-array/some.js +3 -1
- package/stable/typed-array/sort.js +3 -1
- package/stable/typed-array/subarray.js +3 -1
- package/stable/typed-array/to-locale-string.js +3 -1
- package/stable/typed-array/to-string.js +3 -1
- 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 +3 -1
- 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/1.js +1 -0
- package/stage/2.js +0 -1
- package/stage/3.js +1 -0
- package/es/array/virtual/filter-out.js +0 -4
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var $ = require('../internals/export');
|
|
3
|
+
var $groupBy = require('../internals/array-group-by');
|
|
4
|
+
var arraySpeciesConstructor = require('../internals/array-species-constructor');
|
|
5
|
+
var addToUnscopables = require('../internals/add-to-unscopables');
|
|
6
|
+
|
|
7
|
+
// `Array.prototype.groupBy` method
|
|
8
|
+
// https://github.com/tc39/proposal-array-grouping
|
|
9
|
+
$({ target: 'Array', proto: true }, {
|
|
10
|
+
groupBy: function groupBy(callbackfn /* , thisArg */) {
|
|
11
|
+
var thisArg = arguments.length > 1 ? arguments[1] : undefined;
|
|
12
|
+
return $groupBy(this, callbackfn, thisArg, arraySpeciesConstructor);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
addToUnscopables('groupBy');
|
|
@@ -4,7 +4,7 @@ var $ = require('../internals/export');
|
|
|
4
4
|
var anObject = require('../internals/an-object');
|
|
5
5
|
var createAsyncIteratorProxy = require('../internals/async-iterator-create-proxy');
|
|
6
6
|
|
|
7
|
-
var AsyncIteratorProxy = createAsyncIteratorProxy(function (
|
|
7
|
+
var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise, arg) {
|
|
8
8
|
var state = this;
|
|
9
9
|
var iterator = state.iterator;
|
|
10
10
|
|
|
@@ -5,7 +5,7 @@ var anObject = require('../internals/an-object');
|
|
|
5
5
|
var toPositiveInteger = require('../internals/to-positive-integer');
|
|
6
6
|
var createAsyncIteratorProxy = require('../internals/async-iterator-create-proxy');
|
|
7
7
|
|
|
8
|
-
var AsyncIteratorProxy = createAsyncIteratorProxy(function (
|
|
8
|
+
var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise, arg) {
|
|
9
9
|
var state = this;
|
|
10
10
|
|
|
11
11
|
return new Promise(function (resolve, reject) {
|
|
@@ -5,7 +5,7 @@ var aFunction = require('../internals/a-function');
|
|
|
5
5
|
var anObject = require('../internals/an-object');
|
|
6
6
|
var createAsyncIteratorProxy = require('../internals/async-iterator-create-proxy');
|
|
7
7
|
|
|
8
|
-
var AsyncIteratorProxy = createAsyncIteratorProxy(function (
|
|
8
|
+
var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise, arg) {
|
|
9
9
|
var state = this;
|
|
10
10
|
var filterer = state.filterer;
|
|
11
11
|
|
|
@@ -6,7 +6,7 @@ var anObject = require('../internals/an-object');
|
|
|
6
6
|
var createAsyncIteratorProxy = require('../internals/async-iterator-create-proxy');
|
|
7
7
|
var getAsyncIteratorMethod = require('../internals/get-async-iterator-method');
|
|
8
8
|
|
|
9
|
-
var AsyncIteratorProxy = createAsyncIteratorProxy(function (
|
|
9
|
+
var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise, arg) {
|
|
10
10
|
var state = this;
|
|
11
11
|
var mapper = state.mapper;
|
|
12
12
|
var innerIterator, iteratorMethod;
|
|
@@ -9,8 +9,12 @@ var getAsyncIteratorMethod = require('../internals/get-async-iterator-method');
|
|
|
9
9
|
|
|
10
10
|
var AsyncIterator = path.AsyncIterator;
|
|
11
11
|
|
|
12
|
-
var AsyncIteratorProxy = createAsyncIteratorProxy(function (arg) {
|
|
13
|
-
|
|
12
|
+
var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise, arg, hasArg) {
|
|
13
|
+
var step = anObject(this.next.apply(this.iterator, hasArg ? [arg] : []));
|
|
14
|
+
var done = step.done;
|
|
15
|
+
return Promise.resolve(step.value).then(function (value) {
|
|
16
|
+
return { done: done, value: value };
|
|
17
|
+
});
|
|
14
18
|
}, true);
|
|
15
19
|
|
|
16
20
|
$({ target: 'AsyncIterator', stat: true }, {
|
|
@@ -5,7 +5,7 @@ var aFunction = require('../internals/a-function');
|
|
|
5
5
|
var anObject = require('../internals/an-object');
|
|
6
6
|
var createAsyncIteratorProxy = require('../internals/async-iterator-create-proxy');
|
|
7
7
|
|
|
8
|
-
var AsyncIteratorProxy = createAsyncIteratorProxy(function (
|
|
8
|
+
var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise, arg) {
|
|
9
9
|
var state = this;
|
|
10
10
|
var mapper = state.mapper;
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ var anObject = require('../internals/an-object');
|
|
|
5
5
|
var toPositiveInteger = require('../internals/to-positive-integer');
|
|
6
6
|
var createAsyncIteratorProxy = require('../internals/async-iterator-create-proxy');
|
|
7
7
|
|
|
8
|
-
var AsyncIteratorProxy = createAsyncIteratorProxy(function (
|
|
8
|
+
var AsyncIteratorProxy = createAsyncIteratorProxy(function (Promise, arg) {
|
|
9
9
|
var iterator = this.iterator;
|
|
10
10
|
var returnMethod, result;
|
|
11
11
|
if (!this.remaining--) {
|
|
@@ -12,8 +12,9 @@ $({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
|
|
|
12
12
|
merge: function merge(iterable /* ...iterbles */) {
|
|
13
13
|
var map = anObject(this);
|
|
14
14
|
var setter = aFunction(map.set);
|
|
15
|
+
var argumentsLength = arguments.length;
|
|
15
16
|
var i = 0;
|
|
16
|
-
while (i <
|
|
17
|
+
while (i < argumentsLength) {
|
|
17
18
|
iterate(arguments[i++], setter, { that: map, AS_ENTRIES: true });
|
|
18
19
|
}
|
|
19
20
|
return map;
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
var $ = require('../internals/export');
|
|
4
4
|
var requireObjectCoercible = require('../internals/require-object-coercible');
|
|
5
|
-
var toLength = require('../internals/to-length');
|
|
6
5
|
var toInteger = require('../internals/to-integer');
|
|
6
|
+
var toLength = require('../internals/to-length');
|
|
7
|
+
var toString = require('../internals/to-string');
|
|
7
8
|
var fails = require('../internals/fails');
|
|
8
9
|
|
|
9
10
|
var FORCED = fails(function () {
|
|
@@ -14,7 +15,7 @@ var FORCED = fails(function () {
|
|
|
14
15
|
// https://github.com/tc39/proposal-relative-indexing-method
|
|
15
16
|
$({ target: 'String', proto: true, forced: FORCED }, {
|
|
16
17
|
at: function at(index) {
|
|
17
|
-
var S =
|
|
18
|
+
var S = toString(requireObjectCoercible(this));
|
|
18
19
|
var len = toLength(S.length);
|
|
19
20
|
var relativeIndex = toInteger(index);
|
|
20
21
|
var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
var $ = require('../internals/export');
|
|
3
3
|
var createIteratorConstructor = require('../internals/create-iterator-constructor');
|
|
4
4
|
var requireObjectCoercible = require('../internals/require-object-coercible');
|
|
5
|
+
var toString = require('../internals/to-string');
|
|
5
6
|
var InternalStateModule = require('../internals/internal-state');
|
|
6
7
|
var StringMultibyteModule = require('../internals/string-multibyte');
|
|
7
8
|
|
|
@@ -33,6 +34,6 @@ var $StringIterator = createIteratorConstructor(function StringIterator(string)
|
|
|
33
34
|
// https://github.com/tc39/proposal-string-prototype-codepoints
|
|
34
35
|
$({ target: 'String', proto: true }, {
|
|
35
36
|
codePoints: function codePoints() {
|
|
36
|
-
return new $StringIterator(
|
|
37
|
+
return new $StringIterator(toString(requireObjectCoercible(this)));
|
|
37
38
|
}
|
|
38
39
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
// TODO: Remove from `core-js@4`
|
|
2
3
|
var ArrayBufferViewCore = require('../internals/array-buffer-view-core');
|
|
3
|
-
var $
|
|
4
|
+
var $filterReject = require('../internals/array-iteration').filterReject;
|
|
4
5
|
var fromSpeciesAndList = require('../internals/typed-array-from-species-and-list');
|
|
5
6
|
|
|
6
7
|
var aTypedArray = ArrayBufferViewCore.aTypedArray;
|
|
@@ -9,6 +10,6 @@ var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
|
|
|
9
10
|
// `%TypedArray%.prototype.filterOut` method
|
|
10
11
|
// https://github.com/tc39/proposal-array-filtering
|
|
11
12
|
exportTypedArrayMethod('filterOut', function filterOut(callbackfn /* , thisArg */) {
|
|
12
|
-
var list = $
|
|
13
|
+
var list = $filterReject(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
13
14
|
return fromSpeciesAndList(this, list);
|
|
14
15
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var ArrayBufferViewCore = require('../internals/array-buffer-view-core');
|
|
3
|
+
var $filterReject = require('../internals/array-iteration').filterReject;
|
|
4
|
+
var fromSpeciesAndList = require('../internals/typed-array-from-species-and-list');
|
|
5
|
+
|
|
6
|
+
var aTypedArray = ArrayBufferViewCore.aTypedArray;
|
|
7
|
+
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
|
|
8
|
+
|
|
9
|
+
// `%TypedArray%.prototype.filterReject` method
|
|
10
|
+
// https://github.com/tc39/proposal-array-filtering
|
|
11
|
+
exportTypedArrayMethod('filterReject', function filterReject(callbackfn /* , thisArg */) {
|
|
12
|
+
var list = $filterReject(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
13
|
+
return fromSpeciesAndList(this, list);
|
|
14
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var ArrayBufferViewCore = require('../internals/array-buffer-view-core');
|
|
3
|
+
var $groupBy = require('../internals/array-group-by');
|
|
4
|
+
var typedArraySpeciesConstructor = require('../internals/typed-array-species-constructor');
|
|
5
|
+
|
|
6
|
+
var aTypedArray = ArrayBufferViewCore.aTypedArray;
|
|
7
|
+
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
|
|
8
|
+
|
|
9
|
+
// `%TypedArray%.prototype.groupBy` method
|
|
10
|
+
// https://github.com/tc39/proposal-array-grouping
|
|
11
|
+
exportTypedArrayMethod('groupBy', function groupBy(callbackfn /* , thisArg */) {
|
|
12
|
+
var thisArg = arguments.length > 1 ? arguments[1] : undefined;
|
|
13
|
+
return $groupBy(aTypedArray(this), callbackfn, thisArg, typedArraySpeciesConstructor);
|
|
14
|
+
});
|
|
@@ -15,13 +15,16 @@ var bind = require('../internals/function-bind-context');
|
|
|
15
15
|
var classof = require('../internals/classof');
|
|
16
16
|
var anObject = require('../internals/an-object');
|
|
17
17
|
var isObject = require('../internals/is-object');
|
|
18
|
+
var $toString = require('../internals/to-string');
|
|
18
19
|
var create = require('../internals/object-create');
|
|
19
20
|
var createPropertyDescriptor = require('../internals/create-property-descriptor');
|
|
20
21
|
var getIterator = require('../internals/get-iterator');
|
|
21
22
|
var getIteratorMethod = require('../internals/get-iterator-method');
|
|
22
23
|
var wellKnownSymbol = require('../internals/well-known-symbol');
|
|
23
24
|
|
|
24
|
-
var
|
|
25
|
+
var nativeFetch = getBuiltIn('fetch');
|
|
26
|
+
var NativeRequest = getBuiltIn('Request');
|
|
27
|
+
var RequestPrototype = NativeRequest && NativeRequest.prototype;
|
|
25
28
|
var Headers = getBuiltIn('Headers');
|
|
26
29
|
var ITERATOR = wellKnownSymbol('iterator');
|
|
27
30
|
var URL_SEARCH_PARAMS = 'URLSearchParams';
|
|
@@ -150,11 +153,14 @@ var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
|
|
|
150
153
|
(second = entryNext.call(entryIterator)).done ||
|
|
151
154
|
!entryNext.call(entryIterator).done
|
|
152
155
|
) throw TypeError('Expected sequence with length 2');
|
|
153
|
-
entries.push({ key: first.value
|
|
156
|
+
entries.push({ key: $toString(first.value), value: $toString(second.value) });
|
|
154
157
|
}
|
|
155
|
-
} else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key]
|
|
158
|
+
} else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: $toString(init[key]) });
|
|
156
159
|
} else {
|
|
157
|
-
parseSearchParams(
|
|
160
|
+
parseSearchParams(
|
|
161
|
+
entries,
|
|
162
|
+
typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : $toString(init)
|
|
163
|
+
);
|
|
158
164
|
}
|
|
159
165
|
}
|
|
160
166
|
};
|
|
@@ -167,7 +173,7 @@ redefineAll(URLSearchParamsPrototype, {
|
|
|
167
173
|
append: function append(name, value) {
|
|
168
174
|
validateArgumentsLength(arguments.length, 2);
|
|
169
175
|
var state = getInternalParamsState(this);
|
|
170
|
-
state.entries.push({ key: name
|
|
176
|
+
state.entries.push({ key: $toString(name), value: $toString(value) });
|
|
171
177
|
state.updateURL();
|
|
172
178
|
},
|
|
173
179
|
// `URLSearchParams.prototype.delete` method
|
|
@@ -176,7 +182,7 @@ redefineAll(URLSearchParamsPrototype, {
|
|
|
176
182
|
validateArgumentsLength(arguments.length, 1);
|
|
177
183
|
var state = getInternalParamsState(this);
|
|
178
184
|
var entries = state.entries;
|
|
179
|
-
var key = name
|
|
185
|
+
var key = $toString(name);
|
|
180
186
|
var index = 0;
|
|
181
187
|
while (index < entries.length) {
|
|
182
188
|
if (entries[index].key === key) entries.splice(index, 1);
|
|
@@ -189,7 +195,7 @@ redefineAll(URLSearchParamsPrototype, {
|
|
|
189
195
|
get: function get(name) {
|
|
190
196
|
validateArgumentsLength(arguments.length, 1);
|
|
191
197
|
var entries = getInternalParamsState(this).entries;
|
|
192
|
-
var key = name
|
|
198
|
+
var key = $toString(name);
|
|
193
199
|
var index = 0;
|
|
194
200
|
for (; index < entries.length; index++) {
|
|
195
201
|
if (entries[index].key === key) return entries[index].value;
|
|
@@ -201,7 +207,7 @@ redefineAll(URLSearchParamsPrototype, {
|
|
|
201
207
|
getAll: function getAll(name) {
|
|
202
208
|
validateArgumentsLength(arguments.length, 1);
|
|
203
209
|
var entries = getInternalParamsState(this).entries;
|
|
204
|
-
var key = name
|
|
210
|
+
var key = $toString(name);
|
|
205
211
|
var result = [];
|
|
206
212
|
var index = 0;
|
|
207
213
|
for (; index < entries.length; index++) {
|
|
@@ -214,7 +220,7 @@ redefineAll(URLSearchParamsPrototype, {
|
|
|
214
220
|
has: function has(name) {
|
|
215
221
|
validateArgumentsLength(arguments.length, 1);
|
|
216
222
|
var entries = getInternalParamsState(this).entries;
|
|
217
|
-
var key = name
|
|
223
|
+
var key = $toString(name);
|
|
218
224
|
var index = 0;
|
|
219
225
|
while (index < entries.length) {
|
|
220
226
|
if (entries[index++].key === key) return true;
|
|
@@ -228,8 +234,8 @@ redefineAll(URLSearchParamsPrototype, {
|
|
|
228
234
|
var state = getInternalParamsState(this);
|
|
229
235
|
var entries = state.entries;
|
|
230
236
|
var found = false;
|
|
231
|
-
var key = name
|
|
232
|
-
var val = value
|
|
237
|
+
var key = $toString(name);
|
|
238
|
+
var val = $toString(value);
|
|
233
239
|
var index = 0;
|
|
234
240
|
var entry;
|
|
235
241
|
for (; index < entries.length; index++) {
|
|
@@ -313,32 +319,46 @@ $({ global: true, forced: !USE_NATIVE_URL }, {
|
|
|
313
319
|
URLSearchParams: URLSearchParamsConstructor
|
|
314
320
|
});
|
|
315
321
|
|
|
316
|
-
// Wrap `fetch` for correct work with polyfilled `URLSearchParams`
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
var
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
body = init.body;
|
|
327
|
-
if (classof(body) === URL_SEARCH_PARAMS) {
|
|
328
|
-
headers = init.headers ? new Headers(init.headers) : new Headers();
|
|
329
|
-
if (!headers.has('content-type')) {
|
|
330
|
-
headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
|
|
331
|
-
}
|
|
332
|
-
init = create(init, {
|
|
333
|
-
body: createPropertyDescriptor(0, String(body)),
|
|
334
|
-
headers: createPropertyDescriptor(0, headers)
|
|
335
|
-
});
|
|
336
|
-
}
|
|
322
|
+
// Wrap `fetch` and `Request` for correct work with polyfilled `URLSearchParams`
|
|
323
|
+
if (!USE_NATIVE_URL && typeof Headers == 'function') {
|
|
324
|
+
var wrapRequestOptions = function (init) {
|
|
325
|
+
if (isObject(init)) {
|
|
326
|
+
var body = init.body;
|
|
327
|
+
var headers;
|
|
328
|
+
if (classof(body) === URL_SEARCH_PARAMS) {
|
|
329
|
+
headers = init.headers ? new Headers(init.headers) : new Headers();
|
|
330
|
+
if (!headers.has('content-type')) {
|
|
331
|
+
headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
|
|
337
332
|
}
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
333
|
+
return create(init, {
|
|
334
|
+
body: createPropertyDescriptor(0, String(body)),
|
|
335
|
+
headers: createPropertyDescriptor(0, headers)
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
} return init;
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
if (typeof nativeFetch == 'function') {
|
|
342
|
+
$({ global: true, enumerable: true, forced: true }, {
|
|
343
|
+
fetch: function fetch(input /* , init */) {
|
|
344
|
+
return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
if (typeof NativeRequest == 'function') {
|
|
350
|
+
var RequestConstructor = function Request(input /* , init */) {
|
|
351
|
+
anInstance(this, RequestConstructor, 'Request');
|
|
352
|
+
return new NativeRequest(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
RequestPrototype.constructor = RequestConstructor;
|
|
356
|
+
RequestConstructor.prototype = RequestPrototype;
|
|
357
|
+
|
|
358
|
+
$({ global: true, forced: true }, {
|
|
359
|
+
Request: RequestConstructor
|
|
360
|
+
});
|
|
361
|
+
}
|
|
342
362
|
}
|
|
343
363
|
|
|
344
364
|
module.exports = {
|
package/modules/web.url.js
CHANGED
|
@@ -13,6 +13,7 @@ var assign = require('../internals/object-assign');
|
|
|
13
13
|
var arrayFrom = require('../internals/array-from');
|
|
14
14
|
var codeAt = require('../internals/string-multibyte').codeAt;
|
|
15
15
|
var toASCII = require('../internals/string-punycode-to-ascii');
|
|
16
|
+
var $toString = require('../internals/to-string');
|
|
16
17
|
var setToStringTag = require('../internals/set-to-string-tag');
|
|
17
18
|
var URLSearchParamsModule = require('../modules/web.url-search-params');
|
|
18
19
|
var InternalStateModule = require('../internals/internal-state');
|
|
@@ -41,7 +42,7 @@ var HEX = /^[\dA-Fa-f]+$/;
|
|
|
41
42
|
/* eslint-disable no-control-regex -- safe */
|
|
42
43
|
var FORBIDDEN_HOST_CODE_POINT = /[\0\t\n\r #%/:<>?@[\\\]^|]/;
|
|
43
44
|
var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\0\t\n\r #/:<>?@[\\\]^|]/;
|
|
44
|
-
var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\
|
|
45
|
+
var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u0020]+|[\u0000-\u0020]+$/g;
|
|
45
46
|
var TAB_AND_NEW_LINE = /[\t\n\r]/g;
|
|
46
47
|
/* eslint-enable no-control-regex -- safe */
|
|
47
48
|
var EOF;
|
|
@@ -735,13 +736,13 @@ var parseURL = function (url, input, stateOverride, base) {
|
|
|
735
736
|
var URLConstructor = function URL(url /* , base */) {
|
|
736
737
|
var that = anInstance(this, URLConstructor, 'URL');
|
|
737
738
|
var base = arguments.length > 1 ? arguments[1] : undefined;
|
|
738
|
-
var urlString =
|
|
739
|
+
var urlString = $toString(url);
|
|
739
740
|
var state = setInternalState(that, { type: 'URL' });
|
|
740
741
|
var baseState, failure;
|
|
741
742
|
if (base !== undefined) {
|
|
742
743
|
if (base instanceof URLConstructor) baseState = getInternalURLState(base);
|
|
743
744
|
else {
|
|
744
|
-
failure = parseURL(baseState = {},
|
|
745
|
+
failure = parseURL(baseState = {}, $toString(base));
|
|
745
746
|
if (failure) throw TypeError(failure);
|
|
746
747
|
}
|
|
747
748
|
}
|
|
@@ -870,7 +871,7 @@ if (DESCRIPTORS) {
|
|
|
870
871
|
// https://url.spec.whatwg.org/#dom-url-href
|
|
871
872
|
href: accessorDescriptor(serializeURL, function (href) {
|
|
872
873
|
var url = getInternalURLState(this);
|
|
873
|
-
var urlString =
|
|
874
|
+
var urlString = $toString(href);
|
|
874
875
|
var failure = parseURL(url, urlString);
|
|
875
876
|
if (failure) throw TypeError(failure);
|
|
876
877
|
getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
|
|
@@ -882,13 +883,13 @@ if (DESCRIPTORS) {
|
|
|
882
883
|
// https://url.spec.whatwg.org/#dom-url-protocol
|
|
883
884
|
protocol: accessorDescriptor(getProtocol, function (protocol) {
|
|
884
885
|
var url = getInternalURLState(this);
|
|
885
|
-
parseURL(url,
|
|
886
|
+
parseURL(url, $toString(protocol) + ':', SCHEME_START);
|
|
886
887
|
}),
|
|
887
888
|
// `URL.prototype.username` accessors pair
|
|
888
889
|
// https://url.spec.whatwg.org/#dom-url-username
|
|
889
890
|
username: accessorDescriptor(getUsername, function (username) {
|
|
890
891
|
var url = getInternalURLState(this);
|
|
891
|
-
var codePoints = arrayFrom(
|
|
892
|
+
var codePoints = arrayFrom($toString(username));
|
|
892
893
|
if (cannotHaveUsernamePasswordPort(url)) return;
|
|
893
894
|
url.username = '';
|
|
894
895
|
for (var i = 0; i < codePoints.length; i++) {
|
|
@@ -899,7 +900,7 @@ if (DESCRIPTORS) {
|
|
|
899
900
|
// https://url.spec.whatwg.org/#dom-url-password
|
|
900
901
|
password: accessorDescriptor(getPassword, function (password) {
|
|
901
902
|
var url = getInternalURLState(this);
|
|
902
|
-
var codePoints = arrayFrom(
|
|
903
|
+
var codePoints = arrayFrom($toString(password));
|
|
903
904
|
if (cannotHaveUsernamePasswordPort(url)) return;
|
|
904
905
|
url.password = '';
|
|
905
906
|
for (var i = 0; i < codePoints.length; i++) {
|
|
@@ -911,21 +912,21 @@ if (DESCRIPTORS) {
|
|
|
911
912
|
host: accessorDescriptor(getHost, function (host) {
|
|
912
913
|
var url = getInternalURLState(this);
|
|
913
914
|
if (url.cannotBeABaseURL) return;
|
|
914
|
-
parseURL(url,
|
|
915
|
+
parseURL(url, $toString(host), HOST);
|
|
915
916
|
}),
|
|
916
917
|
// `URL.prototype.hostname` accessors pair
|
|
917
918
|
// https://url.spec.whatwg.org/#dom-url-hostname
|
|
918
919
|
hostname: accessorDescriptor(getHostname, function (hostname) {
|
|
919
920
|
var url = getInternalURLState(this);
|
|
920
921
|
if (url.cannotBeABaseURL) return;
|
|
921
|
-
parseURL(url,
|
|
922
|
+
parseURL(url, $toString(hostname), HOSTNAME);
|
|
922
923
|
}),
|
|
923
924
|
// `URL.prototype.port` accessors pair
|
|
924
925
|
// https://url.spec.whatwg.org/#dom-url-port
|
|
925
926
|
port: accessorDescriptor(getPort, function (port) {
|
|
926
927
|
var url = getInternalURLState(this);
|
|
927
928
|
if (cannotHaveUsernamePasswordPort(url)) return;
|
|
928
|
-
port =
|
|
929
|
+
port = $toString(port);
|
|
929
930
|
if (port == '') url.port = null;
|
|
930
931
|
else parseURL(url, port, PORT);
|
|
931
932
|
}),
|
|
@@ -935,13 +936,13 @@ if (DESCRIPTORS) {
|
|
|
935
936
|
var url = getInternalURLState(this);
|
|
936
937
|
if (url.cannotBeABaseURL) return;
|
|
937
938
|
url.path = [];
|
|
938
|
-
parseURL(url, pathname
|
|
939
|
+
parseURL(url, $toString(pathname), PATH_START);
|
|
939
940
|
}),
|
|
940
941
|
// `URL.prototype.search` accessors pair
|
|
941
942
|
// https://url.spec.whatwg.org/#dom-url-search
|
|
942
943
|
search: accessorDescriptor(getSearch, function (search) {
|
|
943
944
|
var url = getInternalURLState(this);
|
|
944
|
-
search =
|
|
945
|
+
search = $toString(search);
|
|
945
946
|
if (search == '') {
|
|
946
947
|
url.query = null;
|
|
947
948
|
} else {
|
|
@@ -958,7 +959,7 @@ if (DESCRIPTORS) {
|
|
|
958
959
|
// https://url.spec.whatwg.org/#dom-url-hash
|
|
959
960
|
hash: accessorDescriptor(getHash, function (hash) {
|
|
960
961
|
var url = getInternalURLState(this);
|
|
961
|
-
hash =
|
|
962
|
+
hash = $toString(hash);
|
|
962
963
|
if (hash == '') {
|
|
963
964
|
url.fragment = null;
|
|
964
965
|
return;
|
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "core-js",
|
|
3
3
|
"description": "Standard library",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.16.3",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "https://github.com/zloirock/core-js.git"
|
|
8
|
-
"directory": "packages/core-js"
|
|
7
|
+
"url": "https://github.com/zloirock/core-js.git"
|
|
9
8
|
},
|
|
10
9
|
"main": "index.js",
|
|
11
10
|
"funding": {
|
|
@@ -55,5 +54,5 @@
|
|
|
55
54
|
"scripts": {
|
|
56
55
|
"postinstall": "node -e \"try{require('./postinstall')}catch(e){}\""
|
|
57
56
|
},
|
|
58
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "390238278109a4517e438c339a22bcbadd87362d"
|
|
59
58
|
}
|
package/postinstall.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable max-len -- for better formatting */
|
|
2
1
|
var fs = require('fs');
|
|
3
2
|
var os = require('os');
|
|
4
3
|
var path = require('path');
|
|
@@ -21,9 +20,11 @@ var CI = [
|
|
|
21
20
|
].some(function (it) { return is(env[it]); });
|
|
22
21
|
|
|
23
22
|
var BANNER = '\u001B[96mThank you for using core-js (\u001B[94m https://github.com/zloirock/core-js \u001B[96m) for polyfilling JavaScript standard library!\u001B[0m\n\n' +
|
|
24
|
-
'\u001B[96mThe project needs your help! Please consider supporting of core-js
|
|
23
|
+
'\u001B[96mThe project needs your help! Please consider supporting of core-js:\u001B[0m\n' +
|
|
25
24
|
'\u001B[96m>\u001B[94m https://opencollective.com/core-js \u001B[0m\n' +
|
|
26
|
-
'\u001B[96m>\u001B[94m https://
|
|
25
|
+
'\u001B[96m>\u001B[94m https://patreon.com/zloirock \u001B[0m\n' +
|
|
26
|
+
'\u001B[96m>\u001B[94m https://paypal.me/zloirock \u001B[0m\n' +
|
|
27
|
+
'\u001B[96m>\u001B[94m bitcoin: bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz \u001B[0m\n\n' +
|
|
27
28
|
'\u001B[96mAlso, the author of core-js (\u001B[94m https://github.com/zloirock \u001B[96m) is looking for a good job -)\u001B[0m\n';
|
|
28
29
|
|
|
29
30
|
function is(it) {
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
// https://github.com/tc39/proposal-array-filtering
|
|
2
|
+
// TODO: Remove from `core-js@4`
|
|
2
3
|
require('../modules/esnext.array.filter-out');
|
|
4
|
+
require('../modules/esnext.array.filter-reject');
|
|
5
|
+
// TODO: Remove from `core-js@4`
|
|
3
6
|
require('../modules/esnext.typed-array.filter-out');
|
|
7
|
+
require('../modules/esnext.typed-array.filter-reject');
|
package/stable/map/index.js
CHANGED
package/stable/object/index.js
CHANGED
package/stable/promise/any.js
CHANGED
package/stable/promise/index.js
CHANGED
package/stable/set/index.js
CHANGED
package/stable/symbol/index.js
CHANGED