core-js 3.15.1 → 3.16.2
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 +2 -3
- 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/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 +33 -3
- 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.promise.js +3 -2
- package/modules/es.reflect.define-property.js +2 -2
- 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.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 -2
- 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
|
@@ -2,7 +2,7 @@ var DESCRIPTORS = require('../internals/descriptors');
|
|
|
2
2
|
var propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');
|
|
3
3
|
var createPropertyDescriptor = require('../internals/create-property-descriptor');
|
|
4
4
|
var toIndexedObject = require('../internals/to-indexed-object');
|
|
5
|
-
var
|
|
5
|
+
var toPropertyKey = require('../internals/to-property-key');
|
|
6
6
|
var has = require('../internals/has');
|
|
7
7
|
var IE8_DOM_DEFINE = require('../internals/ie8-dom-define');
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
|
13
13
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
14
14
|
exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
15
15
|
O = toIndexedObject(O);
|
|
16
|
-
P =
|
|
16
|
+
P = toPropertyKey(P);
|
|
17
17
|
if (IE8_DOM_DEFINE) try {
|
|
18
18
|
return $getOwnPropertyDescriptor(O, P);
|
|
19
19
|
} catch (error) { /* empty */ }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var isObject = require('../internals/is-object');
|
|
2
|
+
|
|
3
|
+
// `OrdinaryToPrimitive` abstract operation
|
|
4
|
+
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
5
|
+
module.exports = function (input, pref) {
|
|
6
|
+
var fn, val;
|
|
7
|
+
if (pref === 'string' && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
|
8
|
+
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
|
|
9
|
+
if (pref !== 'string' && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
|
|
10
|
+
throw TypeError("Can't convert object to primitive value");
|
|
11
|
+
};
|
package/internals/regexp-exec.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
/* eslint-disable regexp/no-
|
|
2
|
+
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
3
3
|
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
4
|
+
var toString = require('../internals/to-string');
|
|
4
5
|
var regexpFlags = require('../internals/regexp-flags');
|
|
5
6
|
var stickyHelpers = require('../internals/regexp-sticky-helpers');
|
|
6
7
|
var shared = require('../internals/shared');
|
|
@@ -31,9 +32,10 @@ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPP
|
|
|
31
32
|
|
|
32
33
|
if (PATCH) {
|
|
33
34
|
// eslint-disable-next-line max-statements -- TODO
|
|
34
|
-
patchedExec = function exec(
|
|
35
|
+
patchedExec = function exec(string) {
|
|
35
36
|
var re = this;
|
|
36
37
|
var state = getInternalState(re);
|
|
38
|
+
var str = toString(string);
|
|
37
39
|
var raw = state.raw;
|
|
38
40
|
var result, reCopy, lastIndex, match, i, object, group;
|
|
39
41
|
|
|
@@ -57,9 +59,9 @@ if (PATCH) {
|
|
|
57
59
|
flags += 'g';
|
|
58
60
|
}
|
|
59
61
|
|
|
60
|
-
strCopy =
|
|
62
|
+
strCopy = str.slice(re.lastIndex);
|
|
61
63
|
// Support anchored sticky behavior.
|
|
62
|
-
if (re.lastIndex > 0 && (!re.multiline || re.multiline && str
|
|
64
|
+
if (re.lastIndex > 0 && (!re.multiline || re.multiline && str.charAt(re.lastIndex - 1) !== '\n')) {
|
|
63
65
|
source = '(?: ' + source + ')';
|
|
64
66
|
strCopy = ' ' + strCopy;
|
|
65
67
|
charsAdded++;
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
var fails = require('../internals/fails');
|
|
2
|
+
var global = require('../internals/global');
|
|
2
3
|
|
|
3
|
-
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
4
|
-
var
|
|
5
|
-
return RegExp(s, f);
|
|
6
|
-
};
|
|
4
|
+
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
5
|
+
var $RegExp = global.RegExp;
|
|
7
6
|
|
|
8
7
|
exports.UNSUPPORTED_Y = fails(function () {
|
|
9
|
-
var re =
|
|
8
|
+
var re = $RegExp('a', 'y');
|
|
10
9
|
re.lastIndex = 2;
|
|
11
10
|
return re.exec('abcd') != null;
|
|
12
11
|
});
|
|
13
12
|
|
|
14
13
|
exports.BROKEN_CARET = fails(function () {
|
|
15
14
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
16
|
-
var re =
|
|
15
|
+
var re = $RegExp('^r', 'gy');
|
|
17
16
|
re.lastIndex = 2;
|
|
18
17
|
return re.exec('str') != null;
|
|
19
18
|
});
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
var fails = require('./fails');
|
|
2
|
+
var global = require('../internals/global');
|
|
3
|
+
|
|
4
|
+
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
5
|
+
var $RegExp = global.RegExp;
|
|
2
6
|
|
|
3
7
|
module.exports = fails(function () {
|
|
4
|
-
|
|
5
|
-
var re = RegExp('.', (typeof '').charAt(0));
|
|
8
|
+
var re = $RegExp('.', 's');
|
|
6
9
|
return !(re.dotAll && re.exec('\n') && re.flags === 's');
|
|
7
10
|
});
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
var fails = require('./fails');
|
|
2
|
+
var global = require('../internals/global');
|
|
3
|
+
|
|
4
|
+
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
5
|
+
var $RegExp = global.RegExp;
|
|
2
6
|
|
|
3
7
|
module.exports = fails(function () {
|
|
4
|
-
|
|
5
|
-
var re = RegExp('(?<a>b)', (typeof '').charAt(5));
|
|
8
|
+
var re = $RegExp('(?<a>b)', 'g');
|
|
6
9
|
return re.exec('b').groups.a !== 'b' ||
|
|
7
10
|
'b'.replace(re, '$<a>c') !== 'bc';
|
|
8
11
|
});
|
package/internals/set-global.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var global = require('../internals/global');
|
|
2
|
-
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
|
|
3
2
|
|
|
4
3
|
module.exports = function (key, value) {
|
|
5
4
|
try {
|
|
6
|
-
|
|
5
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
6
|
+
Object.defineProperty(global, key, { value: value, configurable: true, writable: true });
|
|
7
7
|
} catch (error) {
|
|
8
8
|
global[key] = value;
|
|
9
9
|
} return value;
|
package/internals/shared.js
CHANGED
|
@@ -4,7 +4,7 @@ var store = require('../internals/shared-store');
|
|
|
4
4
|
(module.exports = function (key, value) {
|
|
5
5
|
return store[key] || (store[key] = value !== undefined ? value : {});
|
|
6
6
|
})('versions', []).push({
|
|
7
|
-
version: '3.
|
|
7
|
+
version: '3.16.2',
|
|
8
8
|
mode: IS_PURE ? 'pure' : 'global',
|
|
9
9
|
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
|
|
10
10
|
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
var toInteger = require('../internals/to-integer');
|
|
2
|
+
var toString = require('../internals/to-string');
|
|
2
3
|
var requireObjectCoercible = require('../internals/require-object-coercible');
|
|
3
4
|
|
|
4
|
-
// `String.prototype.
|
|
5
|
+
// `String.prototype.codePointAt` methods implementation
|
|
5
6
|
var createMethod = function (CONVERT_TO_STRING) {
|
|
6
7
|
return function ($this, pos) {
|
|
7
|
-
var S =
|
|
8
|
+
var S = toString(requireObjectCoercible($this));
|
|
8
9
|
var position = toInteger(pos);
|
|
9
10
|
var size = S.length;
|
|
10
11
|
var first, second;
|
package/internals/string-pad.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// https://github.com/tc39/proposal-string-pad-start-end
|
|
2
2
|
var toLength = require('../internals/to-length');
|
|
3
|
+
var toString = require('../internals/to-string');
|
|
3
4
|
var repeat = require('../internals/string-repeat');
|
|
4
5
|
var requireObjectCoercible = require('../internals/require-object-coercible');
|
|
5
6
|
|
|
@@ -8,9 +9,9 @@ var ceil = Math.ceil;
|
|
|
8
9
|
// `String.prototype.{ padStart, padEnd }` methods implementation
|
|
9
10
|
var createMethod = function (IS_END) {
|
|
10
11
|
return function ($this, maxLength, fillString) {
|
|
11
|
-
var S =
|
|
12
|
+
var S = toString(requireObjectCoercible($this));
|
|
12
13
|
var stringLength = S.length;
|
|
13
|
-
var fillStr = fillString === undefined ? ' ' :
|
|
14
|
+
var fillStr = fillString === undefined ? ' ' : toString(fillString);
|
|
14
15
|
var intMaxLength = toLength(maxLength);
|
|
15
16
|
var fillLen, stringFiller;
|
|
16
17
|
if (intMaxLength <= stringLength || fillStr == '') return S;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var toInteger = require('../internals/to-integer');
|
|
3
|
+
var toString = require('../internals/to-string');
|
|
3
4
|
var requireObjectCoercible = require('../internals/require-object-coercible');
|
|
4
5
|
|
|
5
6
|
// `String.prototype.repeat` method implementation
|
|
6
7
|
// https://tc39.es/ecma262/#sec-string.prototype.repeat
|
|
7
8
|
module.exports = function repeat(count) {
|
|
8
|
-
var str =
|
|
9
|
+
var str = toString(requireObjectCoercible(this));
|
|
9
10
|
var result = '';
|
|
10
11
|
var n = toInteger(count);
|
|
11
12
|
if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions');
|
package/internals/string-trim.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
var requireObjectCoercible = require('../internals/require-object-coercible');
|
|
2
|
+
var toString = require('../internals/to-string');
|
|
2
3
|
var whitespaces = require('../internals/whitespaces');
|
|
3
4
|
|
|
4
5
|
var whitespace = '[' + whitespaces + ']';
|
|
@@ -8,7 +9,7 @@ var rtrim = RegExp(whitespace + whitespace + '*$');
|
|
|
8
9
|
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
9
10
|
var createMethod = function (TYPE) {
|
|
10
11
|
return function ($this) {
|
|
11
|
-
var string =
|
|
12
|
+
var string = toString(requireObjectCoercible($this));
|
|
12
13
|
if (TYPE & 1) string = string.replace(ltrim, '');
|
|
13
14
|
if (TYPE & 2) string = string.replace(rtrim, '');
|
|
14
15
|
return string;
|
package/internals/task.js
CHANGED
|
@@ -6,7 +6,6 @@ var createElement = require('../internals/document-create-element');
|
|
|
6
6
|
var IS_IOS = require('../internals/engine-is-ios');
|
|
7
7
|
var IS_NODE = require('../internals/engine-is-node');
|
|
8
8
|
|
|
9
|
-
var location = global.location;
|
|
10
9
|
var set = global.setImmediate;
|
|
11
10
|
var clear = global.clearImmediate;
|
|
12
11
|
var process = global.process;
|
|
@@ -15,7 +14,12 @@ var Dispatch = global.Dispatch;
|
|
|
15
14
|
var counter = 0;
|
|
16
15
|
var queue = {};
|
|
17
16
|
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
18
|
-
var defer, channel, port;
|
|
17
|
+
var location, defer, channel, port;
|
|
18
|
+
|
|
19
|
+
try {
|
|
20
|
+
// Deno throws a ReferenceError on `location` access without `--location` flag
|
|
21
|
+
location = global.location;
|
|
22
|
+
} catch (error) { /* empty */ }
|
|
19
23
|
|
|
20
24
|
var run = function (id) {
|
|
21
25
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
@@ -38,15 +42,16 @@ var listener = function (event) {
|
|
|
38
42
|
|
|
39
43
|
var post = function (id) {
|
|
40
44
|
// old engines have not location.origin
|
|
41
|
-
global.postMessage(id
|
|
45
|
+
global.postMessage(String(id), location.protocol + '//' + location.host);
|
|
42
46
|
};
|
|
43
47
|
|
|
44
48
|
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
45
49
|
if (!set || !clear) {
|
|
46
50
|
set = function setImmediate(fn) {
|
|
47
51
|
var args = [];
|
|
52
|
+
var argumentsLength = arguments.length;
|
|
48
53
|
var i = 1;
|
|
49
|
-
while (
|
|
54
|
+
while (argumentsLength > i) args.push(arguments[i++]);
|
|
50
55
|
queue[++counter] = function () {
|
|
51
56
|
// eslint-disable-next-line no-new-func -- spec requirement
|
|
52
57
|
(typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
var isObject = require('../internals/is-object');
|
|
2
|
+
var isSymbol = require('../internals/is-symbol');
|
|
3
|
+
var ordinaryToPrimitive = require('../internals/ordinary-to-primitive');
|
|
4
|
+
var wellKnownSymbol = require('../internals/well-known-symbol');
|
|
5
|
+
|
|
6
|
+
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
|
2
7
|
|
|
3
8
|
// `ToPrimitive` abstract operation
|
|
4
9
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
module.exports = function (input, pref) {
|
|
11
|
+
if (!isObject(input) || isSymbol(input)) return input;
|
|
12
|
+
var exoticToPrim = input[TO_PRIMITIVE];
|
|
13
|
+
var result;
|
|
14
|
+
if (exoticToPrim !== undefined) {
|
|
15
|
+
if (pref === undefined) pref = 'default';
|
|
16
|
+
result = exoticToPrim.call(input, pref);
|
|
17
|
+
if (!isObject(result) || isSymbol(result)) return result;
|
|
18
|
+
throw TypeError("Can't convert object to primitive value");
|
|
19
|
+
}
|
|
20
|
+
if (pref === undefined) pref = 'number';
|
|
21
|
+
return ordinaryToPrimitive(input, pref);
|
|
14
22
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var toPrimitive = require('../internals/to-primitive');
|
|
2
|
+
var isSymbol = require('../internals/is-symbol');
|
|
3
|
+
|
|
4
|
+
// `ToPropertyKey` abstract operation
|
|
5
|
+
// https://tc39.es/ecma262/#sec-topropertykey
|
|
6
|
+
module.exports = function (argument) {
|
|
7
|
+
var key = toPrimitive(argument, 'string');
|
|
8
|
+
return isSymbol(key) ? key : String(key);
|
|
9
|
+
};
|
|
@@ -8,13 +8,15 @@ var ArrayBufferModule = require('../internals/array-buffer');
|
|
|
8
8
|
var anInstance = require('../internals/an-instance');
|
|
9
9
|
var createPropertyDescriptor = require('../internals/create-property-descriptor');
|
|
10
10
|
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
|
|
11
|
+
var isInteger = require('../internals/is-integer');
|
|
11
12
|
var toLength = require('../internals/to-length');
|
|
12
13
|
var toIndex = require('../internals/to-index');
|
|
13
14
|
var toOffset = require('../internals/to-offset');
|
|
14
|
-
var
|
|
15
|
+
var toPropertyKey = require('../internals/to-property-key');
|
|
15
16
|
var has = require('../internals/has');
|
|
16
17
|
var classof = require('../internals/classof');
|
|
17
18
|
var isObject = require('../internals/is-object');
|
|
19
|
+
var isSymbol = require('../internals/is-symbol');
|
|
18
20
|
var create = require('../internals/object-create');
|
|
19
21
|
var setPrototypeOf = require('../internals/object-set-prototype-of');
|
|
20
22
|
var getOwnPropertyNames = require('../internals/object-get-own-property-names').f;
|
|
@@ -35,6 +37,7 @@ var RangeError = global.RangeError;
|
|
|
35
37
|
var ArrayBuffer = ArrayBufferModule.ArrayBuffer;
|
|
36
38
|
var DataView = ArrayBufferModule.DataView;
|
|
37
39
|
var NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;
|
|
40
|
+
var TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;
|
|
38
41
|
var TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;
|
|
39
42
|
var TypedArray = ArrayBufferViewCore.TypedArray;
|
|
40
43
|
var TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;
|
|
@@ -64,19 +67,22 @@ var isArrayBuffer = function (it) {
|
|
|
64
67
|
|
|
65
68
|
var isTypedArrayIndex = function (target, key) {
|
|
66
69
|
return isTypedArray(target)
|
|
67
|
-
&&
|
|
70
|
+
&& !isSymbol(key)
|
|
68
71
|
&& key in target
|
|
69
|
-
&&
|
|
72
|
+
&& isInteger(+key)
|
|
73
|
+
&& key >= 0;
|
|
70
74
|
};
|
|
71
75
|
|
|
72
76
|
var wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {
|
|
73
|
-
|
|
77
|
+
key = toPropertyKey(key);
|
|
78
|
+
return isTypedArrayIndex(target, key)
|
|
74
79
|
? createPropertyDescriptor(2, target[key])
|
|
75
80
|
: nativeGetOwnPropertyDescriptor(target, key);
|
|
76
81
|
};
|
|
77
82
|
|
|
78
83
|
var wrappedDefineProperty = function defineProperty(target, key, descriptor) {
|
|
79
|
-
|
|
84
|
+
key = toPropertyKey(key);
|
|
85
|
+
if (isTypedArrayIndex(target, key)
|
|
80
86
|
&& isObject(descriptor)
|
|
81
87
|
&& has(descriptor, 'value')
|
|
82
88
|
&& !has(descriptor, 'get')
|
|
@@ -207,6 +213,8 @@ if (DESCRIPTORS) {
|
|
|
207
213
|
createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);
|
|
208
214
|
}
|
|
209
215
|
|
|
216
|
+
createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_CONSTRUCTOR, TypedArrayConstructor);
|
|
217
|
+
|
|
210
218
|
if (TYPED_ARRAY_TAG) {
|
|
211
219
|
createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);
|
|
212
220
|
}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var arrayFromConstructorAndList = require('../internals/array-from-constructor-and-list');
|
|
2
|
+
var typedArraySpeciesConstructor = require('../internals/typed-array-species-constructor');
|
|
3
3
|
|
|
4
4
|
module.exports = function (instance, list) {
|
|
5
|
-
|
|
6
|
-
var index = 0;
|
|
7
|
-
var length = list.length;
|
|
8
|
-
var result = new (aTypedArrayConstructor(C))(length);
|
|
9
|
-
while (length > index) result[index] = list[index++];
|
|
10
|
-
return result;
|
|
5
|
+
return arrayFromConstructorAndList(typedArraySpeciesConstructor(instance), list);
|
|
11
6
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var ArrayBufferViewCore = require('../internals/array-buffer-view-core');
|
|
2
|
+
var speciesConstructor = require('../internals/species-constructor');
|
|
3
|
+
|
|
4
|
+
var TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;
|
|
5
|
+
var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
|
|
6
|
+
|
|
7
|
+
// a part of `TypedArraySpeciesCreate` abstract operation
|
|
8
|
+
// https://tc39.es/ecma262/#typedarray-species-create
|
|
9
|
+
module.exports = function (originalArray) {
|
|
10
|
+
return aTypedArrayConstructor(speciesConstructor(originalArray, originalArray[TYPED_ARRAY_CONSTRUCTOR]));
|
|
11
|
+
};
|
|
@@ -6,6 +6,7 @@ var create = require('../internals/object-create');
|
|
|
6
6
|
var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');
|
|
7
7
|
var createPropertyDescriptor = require('../internals/create-property-descriptor');
|
|
8
8
|
var iterate = require('../internals/iterate');
|
|
9
|
+
var toString = require('../internals/to-string');
|
|
9
10
|
|
|
10
11
|
var $AggregateError = function AggregateError(errors, message) {
|
|
11
12
|
var that = this;
|
|
@@ -14,7 +15,7 @@ var $AggregateError = function AggregateError(errors, message) {
|
|
|
14
15
|
// eslint-disable-next-line unicorn/error-message -- expected
|
|
15
16
|
that = setPrototypeOf(new Error(undefined), getPrototypeOf(that));
|
|
16
17
|
}
|
|
17
|
-
if (message !== undefined) createNonEnumerableProperty(that, 'message',
|
|
18
|
+
if (message !== undefined) createNonEnumerableProperty(that, 'message', toString(message));
|
|
18
19
|
var errorsArray = [];
|
|
19
20
|
iterate(errors, errorsArray.push, { that: errorsArray });
|
|
20
21
|
createNonEnumerableProperty(that, 'errors', errorsArray);
|
package/modules/es.array.sort.js
CHANGED
|
@@ -3,6 +3,7 @@ var $ = require('../internals/export');
|
|
|
3
3
|
var aFunction = require('../internals/a-function');
|
|
4
4
|
var toObject = require('../internals/to-object');
|
|
5
5
|
var toLength = require('../internals/to-length');
|
|
6
|
+
var toString = require('../internals/to-string');
|
|
6
7
|
var fails = require('../internals/fails');
|
|
7
8
|
var internalSort = require('../internals/array-sort');
|
|
8
9
|
var arrayMethodIsStrict = require('../internals/array-method-is-strict');
|
|
@@ -67,7 +68,7 @@ var getSortCompare = function (comparefn) {
|
|
|
67
68
|
if (y === undefined) return -1;
|
|
68
69
|
if (x === undefined) return 1;
|
|
69
70
|
if (comparefn !== undefined) return +comparefn(x, y) || 0;
|
|
70
|
-
return
|
|
71
|
+
return toString(x) > toString(y) ? 1 : -1;
|
|
71
72
|
};
|
|
72
73
|
};
|
|
73
74
|
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var $ = require('../internals/export');
|
|
3
|
+
var fails = require('../internals/fails');
|
|
4
|
+
|
|
5
|
+
var FORCED = fails(function () {
|
|
6
|
+
return new Date(16e11).getYear() !== 120;
|
|
7
|
+
});
|
|
3
8
|
|
|
4
9
|
var getFullYear = Date.prototype.getFullYear;
|
|
5
10
|
|
|
6
11
|
// `Date.prototype.getYear` method
|
|
7
12
|
// https://tc39.es/ecma262/#sec-date.prototype.getyear
|
|
8
|
-
$({ target: 'Date', proto: true }, {
|
|
13
|
+
$({ target: 'Date', proto: true, forced: FORCED }, {
|
|
9
14
|
getYear: function getYear() {
|
|
10
15
|
return getFullYear.call(this) - 1900;
|
|
11
16
|
}
|
|
@@ -15,7 +15,7 @@ $({ target: 'Date', proto: true, forced: FORCED }, {
|
|
|
15
15
|
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
16
16
|
toJSON: function toJSON(key) {
|
|
17
17
|
var O = toObject(this);
|
|
18
|
-
var pv = toPrimitive(O);
|
|
18
|
+
var pv = toPrimitive(O, 'number');
|
|
19
19
|
return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
|
|
20
20
|
}
|
|
21
21
|
});
|
|
@@ -8,7 +8,7 @@ var getTime = DatePrototype.getTime;
|
|
|
8
8
|
|
|
9
9
|
// `Date.prototype.toString` method
|
|
10
10
|
// https://tc39.es/ecma262/#sec-date.prototype.tostring
|
|
11
|
-
if (new Date(NaN)
|
|
11
|
+
if (String(new Date(NaN)) != INVALID_DATE) {
|
|
12
12
|
redefine(DatePrototype, TO_STRING, function toString() {
|
|
13
13
|
var value = getTime.call(this);
|
|
14
14
|
// eslint-disable-next-line no-self-compare -- NaN check
|
package/modules/es.escape.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var $ = require('../internals/export');
|
|
3
|
+
var toString = require('../internals/to-string');
|
|
3
4
|
|
|
4
5
|
var raw = /[\w*+\-./@]/;
|
|
5
6
|
|
|
@@ -13,7 +14,7 @@ var hex = function (code, length) {
|
|
|
13
14
|
// https://tc39.es/ecma262/#sec-escape-string
|
|
14
15
|
$({ global: true }, {
|
|
15
16
|
escape: function escape(string) {
|
|
16
|
-
var str =
|
|
17
|
+
var str = toString(string);
|
|
17
18
|
var result = '';
|
|
18
19
|
var length = str.length;
|
|
19
20
|
var index = 0;
|
|
@@ -6,6 +6,7 @@ var redefine = require('../internals/redefine');
|
|
|
6
6
|
var has = require('../internals/has');
|
|
7
7
|
var classof = require('../internals/classof-raw');
|
|
8
8
|
var inheritIfRequired = require('../internals/inherit-if-required');
|
|
9
|
+
var isSymbol = require('../internals/is-symbol');
|
|
9
10
|
var toPrimitive = require('../internals/to-primitive');
|
|
10
11
|
var fails = require('../internals/fails');
|
|
11
12
|
var create = require('../internals/object-create');
|
|
@@ -24,7 +25,8 @@ var BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;
|
|
|
24
25
|
// `ToNumber` abstract operation
|
|
25
26
|
// https://tc39.es/ecma262/#sec-tonumber
|
|
26
27
|
var toNumber = function (argument) {
|
|
27
|
-
|
|
28
|
+
if (isSymbol(argument)) throw TypeError('Cannot convert a Symbol value to a number');
|
|
29
|
+
var it = toPrimitive(argument, 'number');
|
|
28
30
|
var first, third, radix, maxCode, digits, length, index, code;
|
|
29
31
|
if (typeof it == 'string' && it.length > 2) {
|
|
30
32
|
it = trim(it);
|
|
@@ -3,7 +3,7 @@ var $ = require('../internals/export');
|
|
|
3
3
|
var DESCRIPTORS = require('../internals/descriptors');
|
|
4
4
|
var FORCED = require('../internals/object-prototype-accessors-forced');
|
|
5
5
|
var toObject = require('../internals/to-object');
|
|
6
|
-
var
|
|
6
|
+
var toPropertyKey = require('../internals/to-property-key');
|
|
7
7
|
var getPrototypeOf = require('../internals/object-get-prototype-of');
|
|
8
8
|
var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;
|
|
9
9
|
|
|
@@ -13,7 +13,7 @@ if (DESCRIPTORS) {
|
|
|
13
13
|
$({ target: 'Object', proto: true, forced: FORCED }, {
|
|
14
14
|
__lookupGetter__: function __lookupGetter__(P) {
|
|
15
15
|
var O = toObject(this);
|
|
16
|
-
var key =
|
|
16
|
+
var key = toPropertyKey(P);
|
|
17
17
|
var desc;
|
|
18
18
|
do {
|
|
19
19
|
if (desc = getOwnPropertyDescriptor(O, key)) return desc.get;
|
|
@@ -3,7 +3,7 @@ var $ = require('../internals/export');
|
|
|
3
3
|
var DESCRIPTORS = require('../internals/descriptors');
|
|
4
4
|
var FORCED = require('../internals/object-prototype-accessors-forced');
|
|
5
5
|
var toObject = require('../internals/to-object');
|
|
6
|
-
var
|
|
6
|
+
var toPropertyKey = require('../internals/to-property-key');
|
|
7
7
|
var getPrototypeOf = require('../internals/object-get-prototype-of');
|
|
8
8
|
var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;
|
|
9
9
|
|
|
@@ -13,7 +13,7 @@ if (DESCRIPTORS) {
|
|
|
13
13
|
$({ target: 'Object', proto: true, forced: FORCED }, {
|
|
14
14
|
__lookupSetter__: function __lookupSetter__(P) {
|
|
15
15
|
var O = toObject(this);
|
|
16
|
-
var key =
|
|
16
|
+
var key = toPropertyKey(P);
|
|
17
17
|
var desc;
|
|
18
18
|
do {
|
|
19
19
|
if (desc = getOwnPropertyDescriptor(O, key)) return desc.set;
|
package/modules/es.promise.js
CHANGED
|
@@ -55,7 +55,8 @@ var SUBCLASSING = false;
|
|
|
55
55
|
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
|
|
56
56
|
|
|
57
57
|
var FORCED = isForced(PROMISE, function () {
|
|
58
|
-
var
|
|
58
|
+
var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);
|
|
59
|
+
var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);
|
|
59
60
|
// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
|
60
61
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
|
61
62
|
// We can't detect it synchronously, so just check versions
|
|
@@ -65,7 +66,7 @@ var FORCED = isForced(PROMISE, function () {
|
|
|
65
66
|
// We can't use @@species feature detection in V8 since it causes
|
|
66
67
|
// deoptimization and performance degradation
|
|
67
68
|
// https://github.com/zloirock/core-js/issues/679
|
|
68
|
-
if (V8_VERSION >= 51 && /native code/.test(
|
|
69
|
+
if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;
|
|
69
70
|
// Detect correctness of subclassing with @@species support
|
|
70
71
|
var promise = new PromiseConstructor(function (resolve) { resolve(1); });
|
|
71
72
|
var FakePromise = function (exec) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var $ = require('../internals/export');
|
|
2
2
|
var DESCRIPTORS = require('../internals/descriptors');
|
|
3
3
|
var anObject = require('../internals/an-object');
|
|
4
|
-
var
|
|
4
|
+
var toPropertyKey = require('../internals/to-property-key');
|
|
5
5
|
var definePropertyModule = require('../internals/object-define-property');
|
|
6
6
|
var fails = require('../internals/fails');
|
|
7
7
|
|
|
@@ -16,7 +16,7 @@ var ERROR_INSTEAD_OF_FALSE = fails(function () {
|
|
|
16
16
|
$({ target: 'Reflect', stat: true, forced: ERROR_INSTEAD_OF_FALSE, sham: !DESCRIPTORS }, {
|
|
17
17
|
defineProperty: function defineProperty(target, propertyKey, attributes) {
|
|
18
18
|
anObject(target);
|
|
19
|
-
var key =
|
|
19
|
+
var key = toPropertyKey(propertyKey);
|
|
20
20
|
anObject(attributes);
|
|
21
21
|
try {
|
|
22
22
|
definePropertyModule.f(target, key, attributes);
|
|
@@ -6,6 +6,7 @@ var createNonEnumerableProperty = require('../internals/create-non-enumerable-pr
|
|
|
6
6
|
var defineProperty = require('../internals/object-define-property').f;
|
|
7
7
|
var getOwnPropertyNames = require('../internals/object-get-own-property-names').f;
|
|
8
8
|
var isRegExp = require('../internals/is-regexp');
|
|
9
|
+
var toString = require('../internals/to-string');
|
|
9
10
|
var getFlags = require('../internals/regexp-flags');
|
|
10
11
|
var stickyHelpers = require('../internals/regexp-sticky-helpers');
|
|
11
12
|
var redefine = require('../internals/redefine');
|
|
@@ -125,8 +126,8 @@ if (isForced('RegExp', BASE_FORCED)) {
|
|
|
125
126
|
if (flagsAreUndefined) flags = 'flags' in rawPattern ? rawPattern.flags : getFlags.call(rawPattern);
|
|
126
127
|
}
|
|
127
128
|
|
|
128
|
-
pattern = pattern === undefined ? '' :
|
|
129
|
-
flags = flags === undefined ? '' :
|
|
129
|
+
pattern = pattern === undefined ? '' : toString(pattern);
|
|
130
|
+
flags = flags === undefined ? '' : toString(flags);
|
|
130
131
|
rawPattern = pattern;
|
|
131
132
|
|
|
132
133
|
if (UNSUPPORTED_DOT_ALL && 'dotAll' in re1) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
var redefine = require('../internals/redefine');
|
|
3
3
|
var anObject = require('../internals/an-object');
|
|
4
|
+
var $toString = require('../internals/to-string');
|
|
4
5
|
var fails = require('../internals/fails');
|
|
5
6
|
var flags = require('../internals/regexp-flags');
|
|
6
7
|
|
|
@@ -17,9 +18,9 @@ var INCORRECT_NAME = nativeToString.name != TO_STRING;
|
|
|
17
18
|
if (NOT_GENERIC || INCORRECT_NAME) {
|
|
18
19
|
redefine(RegExp.prototype, TO_STRING, function toString() {
|
|
19
20
|
var R = anObject(this);
|
|
20
|
-
var p =
|
|
21
|
+
var p = $toString(R.source);
|
|
21
22
|
var rf = R.flags;
|
|
22
|
-
var f =
|
|
23
|
+
var f = $toString(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);
|
|
23
24
|
return '/' + p + '/' + f;
|
|
24
25
|
}, { unsafe: true });
|
|
25
26
|
}
|