core-js 3.0.0-beta.7 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +18 -0
- package/es/array/flat-map.js +4 -0
- package/es/array/flat.js +4 -0
- package/es/array/index.js +21 -17
- package/es/array/virtual/flat-map.js +4 -0
- package/es/array/virtual/flat.js +4 -0
- package/es/array/virtual/index.js +7 -2
- package/es/index.js +7 -0
- package/es/instance/bind.js +7 -0
- package/es/instance/code-point-at.js +8 -0
- package/es/instance/concat.js +7 -0
- package/es/instance/copy-within.js +7 -0
- package/es/instance/ends-with.js +8 -0
- package/es/instance/entries.js +7 -0
- package/es/instance/every.js +7 -0
- package/es/instance/fill.js +7 -0
- package/es/instance/filter.js +7 -0
- package/es/instance/find-index.js +7 -0
- package/es/instance/find.js +7 -0
- package/es/instance/flags.js +6 -0
- package/es/instance/flat-map.js +7 -0
- package/es/instance/flat.js +7 -0
- package/es/instance/for-each.js +7 -0
- package/es/instance/includes.js +12 -0
- package/es/instance/index-of.js +7 -0
- package/es/instance/keys.js +7 -0
- package/es/instance/last-index-of.js +7 -0
- package/es/instance/map.js +7 -0
- package/es/instance/pad-end.js +8 -0
- package/es/instance/pad-start.js +8 -0
- package/es/instance/reduce-right.js +7 -0
- package/es/instance/reduce.js +7 -0
- package/es/instance/repeat.js +8 -0
- package/es/instance/reverse.js +7 -0
- package/es/instance/slice.js +7 -0
- package/es/instance/some.js +7 -0
- package/es/instance/sort.js +7 -0
- package/es/instance/splice.js +7 -0
- package/es/instance/starts-with.js +8 -0
- package/es/instance/trim-end.js +8 -0
- package/es/instance/trim-left.js +8 -0
- package/es/instance/trim-right.js +8 -0
- package/es/instance/trim-start.js +8 -0
- package/es/instance/trim.js +8 -0
- package/es/instance/values.js +7 -0
- package/es/number/max-safe-integer.js +1 -1
- package/es/number/min-safe-integer.js +1 -1
- package/es/object/from-entries.js +4 -0
- package/es/object/index.js +1 -0
- package/es/string/index.js +2 -0
- package/es/string/trim-end.js +3 -0
- package/es/string/trim-left.js +3 -0
- package/es/string/trim-right.js +3 -0
- package/es/string/trim-start.js +3 -0
- package/es/string/virtual/index.js +2 -0
- package/es/string/virtual/trim-end.js +3 -0
- package/es/string/virtual/trim-left.js +3 -0
- package/es/string/virtual/trim-right.js +3 -0
- package/es/string/virtual/trim-start.js +3 -0
- package/features/aggregate-error.js +5 -0
- package/features/array/flat-map.js +1 -3
- package/features/array/flat.js +1 -3
- package/features/array/index.js +0 -2
- package/features/array/virtual/flat-map.js +1 -3
- package/features/array/virtual/flat.js +1 -3
- package/features/array/virtual/index.js +0 -3
- package/features/clear-immediate.js +1 -3
- package/features/index.js +1 -0
- package/features/instance/at.js +8 -0
- package/features/instance/bind.js +1 -0
- package/features/instance/code-point-at.js +1 -0
- package/features/instance/code-points.js +8 -0
- package/features/instance/concat.js +1 -0
- package/features/instance/copy-within.js +1 -0
- package/features/instance/ends-with.js +1 -0
- package/features/instance/entries.js +1 -0
- package/features/instance/every.js +1 -0
- package/features/instance/fill.js +1 -0
- package/features/instance/filter.js +1 -0
- package/features/instance/find-index.js +1 -0
- package/features/instance/find.js +1 -0
- package/features/instance/flags.js +1 -0
- package/features/instance/flat-map.js +1 -0
- package/features/instance/flat.js +1 -0
- package/features/instance/for-each.js +1 -0
- package/features/instance/includes.js +1 -0
- package/features/instance/index-of.js +1 -0
- package/features/instance/keys.js +1 -0
- package/features/instance/last-index-of.js +1 -0
- package/features/instance/map.js +1 -0
- package/features/instance/match-all.js +8 -0
- package/features/instance/pad-end.js +1 -0
- package/features/instance/pad-start.js +1 -0
- package/features/instance/reduce-right.js +1 -0
- package/features/instance/reduce.js +1 -0
- package/features/instance/repeat.js +1 -0
- package/features/instance/replace-all.js +8 -0
- package/features/instance/reverse.js +1 -0
- package/features/instance/slice.js +1 -0
- package/features/instance/some.js +1 -0
- package/features/instance/sort.js +1 -0
- package/features/instance/splice.js +1 -0
- package/features/instance/starts-with.js +1 -0
- package/features/instance/trim-end.js +1 -0
- package/features/instance/trim-left.js +1 -0
- package/features/instance/trim-right.js +1 -0
- package/features/instance/trim-start.js +1 -0
- package/features/instance/trim.js +1 -0
- package/features/instance/values.js +1 -0
- package/features/map/index.js +1 -0
- package/features/map/update.js +4 -0
- package/features/object/from-entries.js +1 -4
- package/features/object/index.js +1 -3
- package/features/promise/any.js +10 -0
- package/features/promise/index.js +2 -0
- package/features/queue-microtask.js +1 -3
- package/features/reflect/delete-property.js +1 -3
- package/features/set/index.js +1 -1
- package/features/set/{is-disjoint-with.js → is-disjoint-from.js} +2 -2
- package/features/set-immediate.js +1 -3
- package/features/set-interval.js +1 -3
- package/features/set-timeout.js +1 -3
- package/features/string/index.js +0 -2
- package/features/string/trim-end.js +1 -3
- package/features/string/trim-left.js +1 -3
- package/features/string/trim-right.js +1 -3
- package/features/string/trim-start.js +1 -3
- package/features/string/virtual/index.js +0 -2
- package/features/string/virtual/trim-end.js +1 -3
- package/features/string/virtual/trim-left.js +1 -3
- package/features/string/virtual/trim-right.js +1 -3
- package/features/string/virtual/trim-start.js +1 -3
- package/internals/a-function.js +3 -2
- package/internals/add-to-unscopables.js +3 -1
- package/internals/advance-string-index.js +2 -2
- package/internals/an-instance.js +1 -1
- package/internals/an-object.js +3 -2
- package/internals/array-buffer-view-core.js +13 -7
- package/internals/array-buffer.js +7 -7
- package/internals/array-for-each.js +5 -3
- package/internals/array-from.js +5 -2
- package/internals/array-last-index-of.js +2 -1
- package/internals/{check-array-species-create.js → array-method-has-species-support.js} +2 -2
- package/internals/array-reduce.js +2 -2
- package/internals/call-with-safe-iteration-closing.js +2 -2
- package/internals/check-correctness-of-iteration.js +2 -2
- package/internals/classof.js +1 -1
- package/internals/collection-delete-all.js +3 -3
- package/internals/collection-from.js +25 -0
- package/internals/collection-of.js +8 -0
- package/internals/collection-strong.js +9 -9
- package/internals/collection-weak.js +4 -4
- package/internals/collection.js +9 -9
- package/internals/create-html.js +11 -0
- package/internals/date-to-primitive.js +3 -2
- package/internals/export.js +18 -13
- package/internals/fails.js +1 -1
- package/internals/fix-regexp-well-known-symbol-logic.js +17 -22
- package/internals/flatten-into-array.js +1 -1
- package/internals/{object-forced-pam.js → forced-object-prototype-accessors-methods.js} +4 -4
- package/internals/forced-string-html-method.js +10 -0
- package/internals/forced-string-trim-method.js +11 -0
- package/internals/function-bind.js +5 -5
- package/internals/get-built-in.js +11 -0
- package/internals/get-iterator.js +3 -2
- package/internals/get-map-iterator.js +2 -2
- package/internals/get-set-iterator.js +2 -2
- package/internals/global.js +2 -2
- package/internals/internal-state.js +4 -5
- package/internals/iterate.js +1 -1
- package/internals/math-scale.js +2 -5
- package/internals/microtask.js +13 -10
- package/internals/native-symbol.js +1 -1
- package/internals/native-weak-map.js +4 -0
- package/internals/object-assign.js +5 -5
- package/internals/object-create.js +4 -2
- package/internals/object-define-property.js +2 -2
- package/internals/object-get-own-property-descriptor.js +1 -1
- package/internals/object-get-own-property-names-external.js +1 -1
- package/internals/object-set-prototype-of.js +3 -3
- package/internals/object-to-array.js +12 -12
- package/internals/parse-float.js +1 -1
- package/internals/parse-int.js +1 -1
- package/internals/perform.js +3 -3
- package/internals/punycode-to-ascii.js +5 -5
- package/internals/redefine.js +4 -2
- package/internals/reflect-metadata.js +10 -10
- package/internals/regexp-exec-abstract.js +2 -2
- package/internals/regexp-exec.js +3 -5
- package/internals/require-object-coercible.js +1 -1
- package/internals/set-global.js +1 -1
- package/internals/set-species.js +5 -4
- package/internals/shared.js +2 -2
- package/internals/sloppy-array-method.js +10 -0
- package/internals/string-at.js +13 -15
- package/internals/string-pad.js +3 -2
- package/internals/string-repeat.js +1 -1
- package/internals/string-trim.js +6 -20
- package/internals/this-number-value.js +3 -1
- package/internals/to-index.js +1 -1
- package/internals/to-length.js +1 -1
- package/internals/to-offset.js +1 -1
- package/internals/typed-array-constructor.js +10 -10
- package/internals/typed-array-from.js +12 -6
- package/internals/typed-arrays-constructors-requires-wrappers.js +6 -5
- package/internals/validate-set-prototype-of-arguments.js +3 -1
- package/internals/validate-string-method-arguments.js +3 -2
- package/internals/webkit-string-pad-bug.js +5 -0
- package/internals/well-known-symbol.js +3 -2
- package/internals/whitespaces.js +1 -1
- package/modules/es.array-buffer.is-view.js +4 -3
- package/modules/es.array.concat.js +11 -8
- package/modules/es.array.every.js +1 -1
- package/modules/es.array.filter.js +1 -3
- package/modules/{esnext.array.flat-map.js → es.array.flat-map.js} +0 -2
- package/modules/{esnext.array.flat.js → es.array.flat.js} +0 -2
- package/modules/es.array.index-of.js +1 -1
- package/modules/es.array.join.js +1 -1
- package/modules/es.array.map.js +1 -3
- package/modules/es.array.reduce-right.js +1 -1
- package/modules/es.array.reduce.js +1 -1
- package/modules/es.array.slice.js +4 -4
- package/modules/es.array.some.js +1 -1
- package/modules/es.array.sort.js +7 -7
- package/modules/es.array.splice.js +9 -5
- package/modules/es.array.unscopables.flat-map.js +3 -0
- package/modules/es.array.unscopables.flat.js +3 -0
- package/modules/es.date.to-json.js +6 -4
- package/modules/es.function.name.js +12 -9
- package/modules/es.math.acosh.js +7 -6
- package/modules/es.math.asinh.js +3 -3
- package/modules/es.math.imul.js +6 -4
- package/modules/es.math.sinh.js +5 -3
- package/modules/es.number.constructor.js +7 -5
- package/modules/es.number.is-safe-integer.js +1 -1
- package/modules/es.number.max-safe-integer.js +1 -1
- package/modules/es.number.min-safe-integer.js +1 -1
- package/modules/es.number.to-fixed.js +1 -1
- package/modules/es.object.define-getter.js +2 -1
- package/modules/es.object.define-setter.js +2 -1
- package/modules/es.object.entries.js +2 -2
- package/modules/es.object.freeze.js +6 -4
- package/modules/{esnext.object.from-entries.js → es.object.from-entries.js} +0 -0
- package/modules/es.object.get-own-property-descriptor.js +7 -5
- package/modules/es.object.get-own-property-names.js +5 -2
- package/modules/es.object.get-prototype-of.js +8 -4
- package/modules/es.object.is-extensible.js +5 -3
- package/modules/es.object.is-frozen.js +5 -3
- package/modules/es.object.is-sealed.js +5 -3
- package/modules/es.object.keys.js +4 -3
- package/modules/es.object.lookup-getter.js +5 -4
- package/modules/es.object.lookup-setter.js +5 -4
- package/modules/es.object.prevent-extensions.js +6 -4
- package/modules/es.object.seal.js +6 -4
- package/modules/es.object.to-string.js +3 -2
- package/modules/es.object.values.js +2 -2
- package/modules/es.promise.finally.js +15 -14
- package/modules/es.promise.js +26 -15
- package/modules/es.reflect.apply.js +5 -3
- package/modules/es.reflect.define-property.js +1 -1
- package/modules/es.reflect.get.js +3 -3
- package/modules/es.reflect.prevent-extensions.js +4 -3
- package/modules/es.reflect.set-prototype-of.js +1 -1
- package/modules/es.regexp.constructor.js +9 -5
- package/modules/es.regexp.exec.js +1 -5
- package/modules/es.string.anchor.js +6 -3
- package/modules/es.string.big.js +6 -3
- package/modules/es.string.blink.js +6 -3
- package/modules/es.string.bold.js +6 -3
- package/modules/es.string.code-point-at.js +1 -1
- package/modules/es.string.fixed.js +6 -3
- package/modules/es.string.fontcolor.js +6 -3
- package/modules/es.string.fontsize.js +6 -3
- package/modules/es.string.from-code-point.js +2 -2
- package/modules/es.string.italics.js +6 -3
- package/modules/es.string.iterator.js +2 -2
- package/modules/es.string.link.js +6 -3
- package/modules/es.string.match.js +3 -2
- package/modules/es.string.pad-end.js +1 -4
- package/modules/es.string.pad-start.js +1 -4
- package/modules/es.string.replace.js +6 -5
- package/modules/es.string.search.js +3 -2
- package/modules/es.string.small.js +6 -3
- package/modules/es.string.split.js +27 -24
- package/modules/es.string.strike.js +6 -3
- package/modules/es.string.sub.js +6 -3
- package/modules/es.string.sup.js +6 -3
- package/modules/es.string.trim-end.js +14 -0
- package/modules/es.string.trim-start.js +14 -0
- package/modules/es.string.trim.js +7 -4
- package/modules/es.symbol.js +11 -11
- package/modules/es.typed-array.fill.js +2 -1
- package/modules/es.typed-array.join.js +2 -1
- package/modules/es.typed-array.set.js +1 -1
- package/modules/es.weak-map.js +8 -6
- package/modules/esnext.aggregate-error.js +27 -0
- package/modules/esnext.array.last-index.js +2 -0
- package/modules/esnext.array.last-item.js +2 -0
- package/modules/esnext.composite-key.js +3 -3
- package/modules/esnext.composite-symbol.js +4 -9
- package/modules/esnext.map.delete-all.js +1 -1
- package/modules/esnext.map.every.js +1 -1
- package/modules/esnext.map.filter.js +3 -3
- package/modules/esnext.map.find-key.js +1 -1
- package/modules/esnext.map.find.js +1 -1
- package/modules/esnext.map.from.js +3 -1
- package/modules/esnext.map.group-by.js +8 -3
- package/modules/esnext.map.includes.js +1 -1
- package/modules/esnext.map.key-by.js +5 -2
- package/modules/esnext.map.key-of.js +1 -1
- package/modules/esnext.map.map-keys.js +3 -3
- package/modules/esnext.map.map-values.js +3 -3
- package/modules/esnext.map.merge.js +9 -9
- package/modules/esnext.map.of.js +3 -1
- package/modules/esnext.map.reduce.js +2 -2
- package/modules/esnext.map.some.js +1 -1
- package/modules/esnext.map.update.js +19 -0
- package/modules/esnext.math.imulh.js +1 -1
- package/modules/esnext.math.umulh.js +1 -1
- package/modules/esnext.number.from-string.js +8 -8
- package/modules/esnext.observable.js +12 -12
- package/modules/esnext.promise.all-settled.js +3 -3
- package/modules/esnext.promise.any.js +42 -0
- package/modules/esnext.promise.try.js +8 -6
- package/modules/esnext.reflect.define-metadata.js +7 -4
- package/modules/esnext.reflect.delete-metadata.js +13 -11
- package/modules/esnext.reflect.get-metadata-keys.js +7 -4
- package/modules/esnext.reflect.get-metadata.js +7 -4
- package/modules/esnext.reflect.get-own-metadata-keys.js +7 -4
- package/modules/esnext.reflect.get-own-metadata.js +7 -5
- package/modules/esnext.reflect.has-metadata.js +7 -4
- package/modules/esnext.reflect.has-own-metadata.js +7 -5
- package/modules/esnext.reflect.metadata.js +8 -11
- package/modules/esnext.set.add-all.js +1 -1
- package/modules/esnext.set.delete-all.js +1 -1
- package/modules/esnext.set.difference.js +2 -3
- package/modules/esnext.set.every.js +1 -1
- package/modules/esnext.set.filter.js +3 -3
- package/modules/esnext.set.find.js +1 -1
- package/modules/esnext.set.from.js +3 -1
- package/modules/esnext.set.intersection.js +2 -3
- package/modules/{esnext.set.is-disjoint-with.js → esnext.set.is-disjoint-from.js} +3 -3
- package/modules/esnext.set.is-subset-of.js +10 -7
- package/modules/esnext.set.join.js +1 -1
- package/modules/esnext.set.map.js +3 -3
- package/modules/esnext.set.of.js +3 -1
- package/modules/esnext.set.reduce.js +2 -2
- package/modules/esnext.set.some.js +1 -1
- package/modules/esnext.set.symmetric-difference.js +2 -3
- package/modules/esnext.set.union.js +2 -3
- package/modules/esnext.string.at.js +2 -2
- package/modules/esnext.string.code-points.js +3 -5
- package/modules/esnext.string.match-all.js +3 -3
- package/modules/esnext.string.replace-all.js +15 -5
- package/modules/esnext.weak-map.delete-all.js +1 -1
- package/modules/esnext.weak-map.from.js +3 -1
- package/modules/esnext.weak-map.of.js +3 -1
- package/modules/esnext.weak-set.add-all.js +1 -1
- package/modules/esnext.weak-set.delete-all.js +1 -1
- package/modules/esnext.weak-set.from.js +3 -1
- package/modules/esnext.weak-set.of.js +3 -1
- package/modules/web.dom-collections.for-each.js +1 -1
- package/modules/web.dom-collections.iterator.js +2 -2
- package/modules/web.immediate.js +2 -1
- package/modules/web.queue-microtask.js +1 -1
- package/modules/web.url-search-params.js +21 -3
- package/modules/web.url.js +30 -34
- package/package.json +6 -1
- package/proposals/collection-methods.js +1 -0
- package/proposals/{richer-keys.js → keys-composition.js} +0 -0
- package/proposals/promise-any.js +2 -0
- package/proposals/set-methods.js +1 -1
- package/stable/README.md +1 -0
- package/stable/array/concat.js +1 -0
- package/stable/array/copy-within.js +1 -0
- package/stable/array/entries.js +1 -0
- package/stable/array/every.js +1 -0
- package/stable/array/fill.js +1 -0
- package/stable/array/filter.js +1 -0
- package/stable/array/find-index.js +1 -0
- package/stable/array/find.js +1 -0
- package/stable/array/flat-map.js +1 -0
- package/stable/array/flat.js +1 -0
- package/stable/array/for-each.js +1 -0
- package/stable/array/from.js +1 -0
- package/stable/array/includes.js +1 -0
- package/stable/array/index-of.js +1 -0
- package/stable/array/index.js +1 -0
- package/stable/array/is-array.js +1 -0
- package/stable/array/iterator.js +1 -0
- package/stable/array/join.js +1 -0
- package/stable/array/keys.js +1 -0
- package/stable/array/last-index-of.js +1 -0
- package/stable/array/map.js +1 -0
- package/stable/array/of.js +1 -0
- package/stable/array/reduce-right.js +1 -0
- package/stable/array/reduce.js +1 -0
- package/stable/array/reverse.js +1 -0
- package/stable/array/slice.js +1 -0
- package/stable/array/some.js +1 -0
- package/stable/array/sort.js +1 -0
- package/stable/array/splice.js +1 -0
- package/stable/array/values.js +1 -0
- package/stable/array/virtual/concat.js +1 -0
- package/stable/array/virtual/copy-within.js +1 -0
- package/stable/array/virtual/entries.js +1 -0
- package/stable/array/virtual/every.js +1 -0
- package/stable/array/virtual/fill.js +1 -0
- package/stable/array/virtual/filter.js +1 -0
- package/stable/array/virtual/find-index.js +1 -0
- package/stable/array/virtual/find.js +1 -0
- package/stable/array/virtual/flat-map.js +1 -0
- package/stable/array/virtual/flat.js +1 -0
- package/stable/array/virtual/for-each.js +1 -0
- package/stable/array/virtual/includes.js +1 -0
- package/stable/array/virtual/index-of.js +1 -0
- package/stable/array/virtual/index.js +1 -0
- package/stable/array/virtual/iterator.js +1 -0
- package/stable/array/virtual/join.js +1 -0
- package/stable/array/virtual/keys.js +1 -0
- package/stable/array/virtual/last-index-of.js +1 -0
- package/stable/array/virtual/map.js +1 -0
- package/stable/array/virtual/reduce-right.js +1 -0
- package/stable/array/virtual/reduce.js +1 -0
- package/stable/array/virtual/reverse.js +1 -0
- package/stable/array/virtual/slice.js +1 -0
- package/stable/array/virtual/some.js +1 -0
- package/stable/array/virtual/sort.js +1 -0
- package/stable/array/virtual/splice.js +1 -0
- package/stable/array/virtual/values.js +1 -0
- package/stable/array-buffer/constructor.js +1 -0
- package/stable/array-buffer/index.js +1 -0
- package/stable/array-buffer/is-view.js +1 -0
- package/stable/array-buffer/slice.js +1 -0
- package/stable/clear-immediate.js +3 -0
- package/stable/data-view/index.js +1 -0
- package/stable/date/index.js +1 -0
- package/stable/date/now.js +1 -0
- package/stable/date/to-iso-string.js +1 -0
- package/stable/date/to-json.js +1 -0
- package/stable/date/to-primitive.js +1 -0
- package/stable/date/to-string.js +1 -0
- package/stable/dom-collections/for-each.js +3 -0
- package/stable/dom-collections/index.js +11 -0
- package/stable/dom-collections/iterator.js +3 -0
- package/stable/function/bind.js +1 -0
- package/stable/function/has-instance.js +1 -0
- package/stable/function/index.js +1 -0
- package/stable/function/name.js +1 -0
- package/stable/function/virtual/bind.js +1 -0
- package/stable/function/virtual/index.js +1 -0
- package/stable/global-this.js +3 -0
- package/stable/index.js +4 -0
- package/stable/instance/bind.js +1 -0
- package/stable/instance/code-point-at.js +1 -0
- package/stable/instance/concat.js +1 -0
- package/stable/instance/copy-within.js +1 -0
- package/stable/instance/ends-with.js +1 -0
- package/stable/instance/entries.js +16 -0
- package/stable/instance/every.js +1 -0
- package/stable/instance/fill.js +1 -0
- package/stable/instance/filter.js +1 -0
- package/stable/instance/find-index.js +1 -0
- package/stable/instance/find.js +1 -0
- package/stable/instance/flags.js +1 -0
- package/stable/instance/flat-map.js +1 -0
- package/stable/instance/flat.js +1 -0
- package/stable/instance/for-each.js +16 -0
- package/stable/instance/includes.js +1 -0
- package/stable/instance/index-of.js +1 -0
- package/stable/instance/keys.js +16 -0
- package/stable/instance/last-index-of.js +1 -0
- package/stable/instance/map.js +1 -0
- package/stable/instance/pad-end.js +1 -0
- package/stable/instance/pad-start.js +1 -0
- package/stable/instance/reduce-right.js +1 -0
- package/stable/instance/reduce.js +1 -0
- package/stable/instance/repeat.js +1 -0
- package/stable/instance/reverse.js +1 -0
- package/stable/instance/slice.js +1 -0
- package/stable/instance/some.js +1 -0
- package/stable/instance/sort.js +1 -0
- package/stable/instance/splice.js +1 -0
- package/stable/instance/starts-with.js +1 -0
- package/stable/instance/trim-end.js +1 -0
- package/stable/instance/trim-left.js +1 -0
- package/stable/instance/trim-right.js +1 -0
- package/stable/instance/trim-start.js +1 -0
- package/stable/instance/trim.js +1 -0
- package/stable/instance/values.js +16 -0
- package/stable/json/index.js +1 -0
- package/stable/json/stringify.js +1 -0
- package/stable/json/to-string-tag.js +1 -0
- package/stable/map/index.js +1 -0
- package/stable/math/acosh.js +1 -0
- package/stable/math/asinh.js +1 -0
- package/stable/math/atanh.js +1 -0
- package/stable/math/cbrt.js +1 -0
- package/stable/math/clz32.js +1 -0
- package/stable/math/cosh.js +1 -0
- package/stable/math/expm1.js +1 -0
- package/stable/math/fround.js +1 -0
- package/stable/math/hypot.js +1 -0
- package/stable/math/imul.js +1 -0
- package/stable/math/index.js +1 -0
- package/stable/math/log10.js +1 -0
- package/stable/math/log1p.js +1 -0
- package/stable/math/log2.js +1 -0
- package/stable/math/sign.js +1 -0
- package/stable/math/sinh.js +1 -0
- package/stable/math/tanh.js +1 -0
- package/stable/math/to-string-tag.js +1 -0
- package/stable/math/trunc.js +1 -0
- package/stable/number/constructor.js +1 -0
- package/stable/number/epsilon.js +1 -0
- package/stable/number/index.js +1 -0
- package/stable/number/is-finite.js +1 -0
- package/stable/number/is-integer.js +1 -0
- package/stable/number/is-nan.js +1 -0
- package/stable/number/is-safe-integer.js +1 -0
- package/stable/number/max-safe-integer.js +1 -0
- package/stable/number/min-safe-integer.js +1 -0
- package/stable/number/parse-float.js +1 -0
- package/stable/number/parse-int.js +1 -0
- package/stable/number/to-fixed.js +1 -0
- package/stable/number/to-precision.js +1 -0
- package/stable/number/virtual/index.js +1 -0
- package/stable/number/virtual/to-fixed.js +1 -0
- package/stable/number/virtual/to-precision.js +1 -0
- package/stable/object/assign.js +1 -0
- package/stable/object/create.js +1 -0
- package/stable/object/define-getter.js +1 -0
- package/stable/object/define-properties.js +1 -0
- package/stable/object/define-property.js +1 -0
- package/stable/object/define-setter.js +1 -0
- package/stable/object/entries.js +1 -0
- package/stable/object/freeze.js +1 -0
- package/stable/object/from-entries.js +1 -0
- package/stable/object/get-own-property-descriptor.js +1 -0
- package/stable/object/get-own-property-descriptors.js +1 -0
- package/stable/object/get-own-property-names.js +1 -0
- package/stable/object/get-own-property-symbols.js +1 -0
- package/stable/object/get-prototype-of.js +1 -0
- package/stable/object/index.js +1 -0
- package/stable/object/is-extensible.js +1 -0
- package/stable/object/is-frozen.js +1 -0
- package/stable/object/is-sealed.js +1 -0
- package/stable/object/is.js +1 -0
- package/stable/object/keys.js +1 -0
- package/stable/object/lookup-getter.js +1 -0
- package/stable/object/lookup-setter.js +1 -0
- package/stable/object/prevent-extensions.js +1 -0
- package/stable/object/seal.js +1 -0
- package/stable/object/set-prototype-of.js +1 -0
- package/stable/object/to-string.js +1 -0
- package/stable/object/values.js +1 -0
- package/stable/parse-float.js +1 -0
- package/stable/parse-int.js +1 -0
- package/stable/promise/finally.js +1 -0
- package/stable/promise/index.js +1 -0
- package/stable/queue-microtask.js +1 -0
- package/stable/reflect/apply.js +1 -0
- package/stable/reflect/construct.js +1 -0
- package/stable/reflect/define-property.js +1 -0
- package/stable/reflect/delete-property.js +1 -0
- package/stable/reflect/get-own-property-descriptor.js +1 -0
- package/stable/reflect/get-prototype-of.js +1 -0
- package/stable/reflect/get.js +1 -0
- package/stable/reflect/has.js +1 -0
- package/stable/reflect/index.js +1 -0
- package/stable/reflect/is-extensible.js +1 -0
- package/stable/reflect/own-keys.js +1 -0
- package/stable/reflect/prevent-extensions.js +1 -0
- package/stable/reflect/set-prototype-of.js +1 -0
- package/stable/reflect/set.js +1 -0
- package/stable/regexp/constructor.js +1 -0
- package/stable/regexp/flags.js +1 -0
- package/stable/regexp/index.js +1 -0
- package/stable/regexp/match.js +1 -0
- package/stable/regexp/replace.js +1 -0
- package/stable/regexp/search.js +1 -0
- package/stable/regexp/split.js +1 -0
- package/stable/regexp/to-string.js +1 -0
- package/stable/set/index.js +1 -0
- package/stable/set-immediate.js +3 -0
- package/stable/set-interval.js +3 -0
- package/stable/set-timeout.js +3 -0
- package/stable/string/anchor.js +1 -0
- package/stable/string/big.js +1 -0
- package/stable/string/blink.js +1 -0
- package/stable/string/bold.js +1 -0
- package/stable/string/code-point-at.js +1 -0
- package/stable/string/ends-with.js +1 -0
- package/stable/string/fixed.js +1 -0
- package/stable/string/fontcolor.js +1 -0
- package/stable/string/fontsize.js +1 -0
- package/stable/string/from-code-point.js +1 -0
- package/stable/string/includes.js +1 -0
- package/stable/string/index.js +1 -0
- package/stable/string/italics.js +1 -0
- package/stable/string/iterator.js +1 -0
- package/stable/string/link.js +1 -0
- package/stable/string/match.js +1 -0
- package/stable/string/pad-end.js +1 -0
- package/stable/string/pad-start.js +1 -0
- package/stable/string/raw.js +1 -0
- package/stable/string/repeat.js +1 -0
- package/stable/string/replace.js +1 -0
- package/stable/string/search.js +1 -0
- package/stable/string/small.js +1 -0
- package/stable/string/split.js +1 -0
- package/stable/string/starts-with.js +1 -0
- package/stable/string/strike.js +1 -0
- package/stable/string/sub.js +1 -0
- package/stable/string/sup.js +1 -0
- package/stable/string/trim-end.js +1 -0
- package/stable/string/trim-left.js +1 -0
- package/stable/string/trim-right.js +1 -0
- package/stable/string/trim-start.js +1 -0
- package/stable/string/trim.js +1 -0
- package/stable/string/virtual/anchor.js +1 -0
- package/stable/string/virtual/big.js +1 -0
- package/stable/string/virtual/blink.js +1 -0
- package/stable/string/virtual/bold.js +1 -0
- package/stable/string/virtual/code-point-at.js +1 -0
- package/stable/string/virtual/ends-with.js +1 -0
- package/stable/string/virtual/fixed.js +1 -0
- package/stable/string/virtual/fontcolor.js +1 -0
- package/stable/string/virtual/fontsize.js +1 -0
- package/stable/string/virtual/includes.js +1 -0
- package/stable/string/virtual/index.js +1 -0
- package/stable/string/virtual/italics.js +1 -0
- package/stable/string/virtual/iterator.js +1 -0
- package/stable/string/virtual/link.js +1 -0
- package/stable/string/virtual/pad-end.js +1 -0
- package/stable/string/virtual/pad-start.js +1 -0
- package/stable/string/virtual/repeat.js +1 -0
- package/stable/string/virtual/small.js +1 -0
- package/stable/string/virtual/starts-with.js +1 -0
- package/stable/string/virtual/strike.js +1 -0
- package/stable/string/virtual/sub.js +1 -0
- package/stable/string/virtual/sup.js +1 -0
- package/stable/string/virtual/trim-end.js +1 -0
- package/stable/string/virtual/trim-left.js +1 -0
- package/stable/string/virtual/trim-right.js +1 -0
- package/stable/string/virtual/trim-start.js +1 -0
- package/stable/string/virtual/trim.js +1 -0
- package/stable/symbol/async-iterator.js +1 -0
- package/stable/symbol/description.js +1 -0
- package/stable/symbol/for.js +1 -0
- package/stable/symbol/has-instance.js +1 -0
- package/stable/symbol/index.js +1 -0
- package/stable/symbol/is-concat-spreadable.js +1 -0
- package/stable/symbol/iterator.js +1 -0
- package/stable/symbol/key-for.js +1 -0
- package/stable/symbol/match.js +1 -0
- package/stable/symbol/replace.js +1 -0
- package/stable/symbol/search.js +1 -0
- package/stable/symbol/species.js +1 -0
- package/stable/symbol/split.js +1 -0
- package/stable/symbol/to-primitive.js +1 -0
- package/stable/symbol/to-string-tag.js +1 -0
- package/stable/symbol/unscopables.js +1 -0
- package/stable/typed-array/copy-within.js +1 -0
- package/stable/typed-array/entries.js +1 -0
- package/stable/typed-array/every.js +1 -0
- package/stable/typed-array/fill.js +1 -0
- package/stable/typed-array/filter.js +1 -0
- package/stable/typed-array/find-index.js +1 -0
- package/stable/typed-array/find.js +1 -0
- package/stable/typed-array/float32-array.js +1 -0
- package/stable/typed-array/float64-array.js +1 -0
- package/stable/typed-array/for-each.js +1 -0
- package/stable/typed-array/from.js +1 -0
- package/stable/typed-array/includes.js +1 -0
- package/stable/typed-array/index-of.js +1 -0
- package/stable/typed-array/index.js +1 -0
- package/stable/typed-array/int16-array.js +1 -0
- package/stable/typed-array/int32-array.js +1 -0
- package/stable/typed-array/int8-array.js +1 -0
- package/stable/typed-array/iterator.js +1 -0
- package/stable/typed-array/join.js +1 -0
- package/stable/typed-array/keys.js +1 -0
- package/stable/typed-array/last-index-of.js +1 -0
- package/stable/typed-array/map.js +1 -0
- package/stable/typed-array/of.js +1 -0
- package/stable/typed-array/reduce-right.js +1 -0
- package/stable/typed-array/reduce.js +1 -0
- package/stable/typed-array/reverse.js +1 -0
- package/stable/typed-array/set.js +1 -0
- package/stable/typed-array/slice.js +1 -0
- package/stable/typed-array/some.js +1 -0
- package/stable/typed-array/sort.js +1 -0
- package/stable/typed-array/subarray.js +1 -0
- package/stable/typed-array/to-locale-string.js +1 -0
- package/stable/typed-array/to-string.js +1 -0
- package/stable/typed-array/uint16-array.js +1 -0
- package/stable/typed-array/uint32-array.js +1 -0
- package/stable/typed-array/uint8-array.js +1 -0
- package/stable/typed-array/uint8-clamped-array.js +1 -0
- package/stable/typed-array/values.js +1 -0
- package/stable/url/index.js +1 -0
- package/stable/url/to-json.js +1 -0
- package/stable/url-search-params/index.js +1 -0
- package/stable/weak-map/index.js +1 -0
- package/stable/weak-set/index.js +1 -0
- package/stage/0.js +1 -0
- package/stage/1.js +1 -2
- package/stage/2.js +1 -0
- package/stage/3.js +0 -3
- package/internals/object-statics-accept-primitives.js +0 -11
- package/internals/set-collection-from.js +0 -28
- package/internals/set-collection-of.js +0 -12
- package/internals/strict-method.js +0 -9
- package/internals/string-html.js +0 -21
- package/modules/esnext.string.trim-left.js +0 -8
- package/modules/esnext.string.trim-right.js +0 -8
- package/proposals/array-flat-and-flat-map.js +0 -2
- package/proposals/object-from-entries.js +0 -2
- package/proposals/string-trim-start-end.js +0 -2
|
@@ -13,7 +13,7 @@ module.exports = function (that, callbackfn, argumentsLength, memo, isRight) {
|
|
|
13
13
|
var length = toLength(O.length);
|
|
14
14
|
var index = isRight ? length - 1 : 0;
|
|
15
15
|
var i = isRight ? -1 : 1;
|
|
16
|
-
if (argumentsLength < 2)
|
|
16
|
+
if (argumentsLength < 2) while (true) {
|
|
17
17
|
if (index in self) {
|
|
18
18
|
memo = self[index];
|
|
19
19
|
index += i;
|
|
@@ -21,7 +21,7 @@ module.exports = function (that, callbackfn, argumentsLength, memo, isRight) {
|
|
|
21
21
|
}
|
|
22
22
|
index += i;
|
|
23
23
|
if (isRight ? index < 0 : length <= index) {
|
|
24
|
-
throw TypeError('Reduce of empty array with no initial value
|
|
24
|
+
throw TypeError('Reduce of empty array with no initial value');
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
for (;isRight ? index >= 0 : length > index; index += i) if (index in self) {
|
|
@@ -5,9 +5,9 @@ module.exports = function (iterator, fn, value, ENTRIES) {
|
|
|
5
5
|
try {
|
|
6
6
|
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
|
|
7
7
|
// 7.4.6 IteratorClose(iterator, completion)
|
|
8
|
-
} catch (
|
|
8
|
+
} catch (error) {
|
|
9
9
|
var returnMethod = iterator['return'];
|
|
10
10
|
if (returnMethod !== undefined) anObject(returnMethod.call(iterator));
|
|
11
|
-
throw
|
|
11
|
+
throw error;
|
|
12
12
|
}
|
|
13
13
|
};
|
|
@@ -16,7 +16,7 @@ try {
|
|
|
16
16
|
};
|
|
17
17
|
// eslint-disable-next-line no-throw-literal
|
|
18
18
|
Array.from(iteratorWithReturn, function () { throw 2; });
|
|
19
|
-
} catch (
|
|
19
|
+
} catch (error) { /* empty */ }
|
|
20
20
|
|
|
21
21
|
module.exports = function (exec, SKIP_CLOSING) {
|
|
22
22
|
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
|
|
@@ -31,6 +31,6 @@ module.exports = function (exec, SKIP_CLOSING) {
|
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
33
|
exec(object);
|
|
34
|
-
} catch (
|
|
34
|
+
} catch (error) { /* empty */ }
|
|
35
35
|
return ITERATION_SUPPORT;
|
|
36
36
|
};
|
package/internals/classof.js
CHANGED
|
@@ -7,7 +7,7 @@ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Argu
|
|
|
7
7
|
var tryGet = function (it, key) {
|
|
8
8
|
try {
|
|
9
9
|
return it[key];
|
|
10
|
-
} catch (
|
|
10
|
+
} catch (error) { /* empty */ }
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
// getting tag from ES6+ `Object.prototype.toString`
|
|
@@ -6,9 +6,9 @@ var aFunction = require('../internals/a-function');
|
|
|
6
6
|
module.exports = function (/* ...elements */) {
|
|
7
7
|
var collection = anObject(this);
|
|
8
8
|
var remover = aFunction(collection['delete']);
|
|
9
|
-
var
|
|
9
|
+
var allDeleted = true;
|
|
10
10
|
for (var k = 0, len = arguments.length; k < len; k++) {
|
|
11
|
-
|
|
11
|
+
allDeleted = allDeleted && remover.call(collection, arguments[k]);
|
|
12
12
|
}
|
|
13
|
-
return
|
|
13
|
+
return !!allDeleted;
|
|
14
14
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
// https://tc39.github.io/proposal-setmap-offrom/
|
|
3
|
+
var aFunction = require('../internals/a-function');
|
|
4
|
+
var bind = require('../internals/bind-context');
|
|
5
|
+
var iterate = require('../internals/iterate');
|
|
6
|
+
|
|
7
|
+
module.exports = function from(source /* , mapFn, thisArg */) {
|
|
8
|
+
var mapFn = arguments[1];
|
|
9
|
+
var mapping, A, n, boundFunction;
|
|
10
|
+
aFunction(this);
|
|
11
|
+
mapping = mapFn !== undefined;
|
|
12
|
+
if (mapping) aFunction(mapFn);
|
|
13
|
+
if (source == undefined) return new this();
|
|
14
|
+
A = [];
|
|
15
|
+
if (mapping) {
|
|
16
|
+
n = 0;
|
|
17
|
+
boundFunction = bind(mapFn, arguments[2], 2);
|
|
18
|
+
iterate(source, function (nextItem) {
|
|
19
|
+
A.push(boundFunction(nextItem, n++));
|
|
20
|
+
});
|
|
21
|
+
} else {
|
|
22
|
+
iterate(source, A.push, A);
|
|
23
|
+
}
|
|
24
|
+
return new this(A);
|
|
25
|
+
};
|
|
@@ -14,11 +14,11 @@ var setInternalState = InternalStateModule.set;
|
|
|
14
14
|
var internalStateGetterFor = InternalStateModule.getterFor;
|
|
15
15
|
|
|
16
16
|
module.exports = {
|
|
17
|
-
getConstructor: function (wrapper,
|
|
17
|
+
getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
|
|
18
18
|
var C = wrapper(function (that, iterable) {
|
|
19
|
-
anInstance(that, C,
|
|
19
|
+
anInstance(that, C, CONSTRUCTOR_NAME);
|
|
20
20
|
setInternalState(that, {
|
|
21
|
-
type:
|
|
21
|
+
type: CONSTRUCTOR_NAME,
|
|
22
22
|
index: create(null),
|
|
23
23
|
first: undefined,
|
|
24
24
|
last: undefined,
|
|
@@ -28,7 +28,7 @@ module.exports = {
|
|
|
28
28
|
if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
var getInternalState = internalStateGetterFor(
|
|
31
|
+
var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
|
32
32
|
|
|
33
33
|
var define = function (that, key, value) {
|
|
34
34
|
var state = getInternalState(that);
|
|
@@ -147,13 +147,13 @@ module.exports = {
|
|
|
147
147
|
});
|
|
148
148
|
return C;
|
|
149
149
|
},
|
|
150
|
-
setStrong: function (C,
|
|
151
|
-
var ITERATOR_NAME =
|
|
152
|
-
var getInternalCollectionState = internalStateGetterFor(
|
|
150
|
+
setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {
|
|
151
|
+
var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
|
|
152
|
+
var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
|
153
153
|
var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);
|
|
154
154
|
// add .keys, .values, .entries, [@@iterator]
|
|
155
155
|
// 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
|
|
156
|
-
defineIterator(C,
|
|
156
|
+
defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {
|
|
157
157
|
setInternalState(this, {
|
|
158
158
|
type: ITERATOR_NAME,
|
|
159
159
|
target: iterated,
|
|
@@ -180,6 +180,6 @@ module.exports = {
|
|
|
180
180
|
}, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
|
|
181
181
|
|
|
182
182
|
// add [@@species], 23.1.2.2, 23.2.2.2
|
|
183
|
-
setSpecies(
|
|
183
|
+
setSpecies(CONSTRUCTOR_NAME);
|
|
184
184
|
}
|
|
185
185
|
};
|
|
@@ -52,18 +52,18 @@ UncaughtFrozenStore.prototype = {
|
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
module.exports = {
|
|
55
|
-
getConstructor: function (wrapper,
|
|
55
|
+
getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
|
|
56
56
|
var C = wrapper(function (that, iterable) {
|
|
57
|
-
anInstance(that, C,
|
|
57
|
+
anInstance(that, C, CONSTRUCTOR_NAME);
|
|
58
58
|
setInternalState(that, {
|
|
59
|
-
type:
|
|
59
|
+
type: CONSTRUCTOR_NAME,
|
|
60
60
|
id: id++,
|
|
61
61
|
frozen: undefined
|
|
62
62
|
});
|
|
63
63
|
if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);
|
|
64
64
|
});
|
|
65
65
|
|
|
66
|
-
var getInternalState = internalStateGetterFor(
|
|
66
|
+
var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
|
67
67
|
|
|
68
68
|
var define = function (that, key, value) {
|
|
69
69
|
var state = getInternalState(that);
|
package/internals/collection.js
CHANGED
|
@@ -12,8 +12,8 @@ var checkCorrectnessOfIteration = require('../internals/check-correctness-of-ite
|
|
|
12
12
|
var setToStringTag = require('../internals/set-to-string-tag');
|
|
13
13
|
var inheritIfRequired = require('../internals/inherit-if-required');
|
|
14
14
|
|
|
15
|
-
module.exports = function (
|
|
16
|
-
var NativeConstructor = global[
|
|
15
|
+
module.exports = function (CONSTRUCTOR_NAME, wrapper, common, IS_MAP, IS_WEAK) {
|
|
16
|
+
var NativeConstructor = global[CONSTRUCTOR_NAME];
|
|
17
17
|
var NativePrototype = NativeConstructor && NativeConstructor.prototype;
|
|
18
18
|
var Constructor = NativeConstructor;
|
|
19
19
|
var ADDER = IS_MAP ? 'set' : 'add';
|
|
@@ -39,13 +39,13 @@ module.exports = function (NAME, wrapper, common, IS_MAP, IS_WEAK) {
|
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
// eslint-disable-next-line max-len
|
|
42
|
-
if (isForced(
|
|
42
|
+
if (isForced(CONSTRUCTOR_NAME, typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
|
|
43
43
|
new NativeConstructor().entries().next();
|
|
44
44
|
})))) {
|
|
45
45
|
// create collection constructor
|
|
46
|
-
Constructor = common.getConstructor(wrapper,
|
|
46
|
+
Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
|
|
47
47
|
InternalMetadataModule.REQUIRED = true;
|
|
48
|
-
} else if (isForced(
|
|
48
|
+
} else if (isForced(CONSTRUCTOR_NAME, true)) {
|
|
49
49
|
var instance = new Constructor();
|
|
50
50
|
// early implementations not supports chaining
|
|
51
51
|
var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
|
|
@@ -65,7 +65,7 @@ module.exports = function (NAME, wrapper, common, IS_MAP, IS_WEAK) {
|
|
|
65
65
|
|
|
66
66
|
if (!ACCEPT_ITERABLES) {
|
|
67
67
|
Constructor = wrapper(function (target, iterable) {
|
|
68
|
-
anInstance(target, Constructor,
|
|
68
|
+
anInstance(target, Constructor, CONSTRUCTOR_NAME);
|
|
69
69
|
var that = inheritIfRequired(new NativeConstructor(), target, Constructor);
|
|
70
70
|
if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);
|
|
71
71
|
return that;
|
|
@@ -86,12 +86,12 @@ module.exports = function (NAME, wrapper, common, IS_MAP, IS_WEAK) {
|
|
|
86
86
|
if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
exported[
|
|
89
|
+
exported[CONSTRUCTOR_NAME] = Constructor;
|
|
90
90
|
$export({ global: true, forced: Constructor != NativeConstructor }, exported);
|
|
91
91
|
|
|
92
|
-
setToStringTag(Constructor,
|
|
92
|
+
setToStringTag(Constructor, CONSTRUCTOR_NAME);
|
|
93
93
|
|
|
94
|
-
if (!IS_WEAK) common.setStrong(Constructor,
|
|
94
|
+
if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
|
|
95
95
|
|
|
96
96
|
return Constructor;
|
|
97
97
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var requireObjectCoercible = require('../internals/require-object-coercible');
|
|
2
|
+
var quot = /"/g;
|
|
3
|
+
|
|
4
|
+
// B.2.3.2.1 CreateHTML(string, tag, attribute, value)
|
|
5
|
+
// https://tc39.github.io/ecma262/#sec-createhtml
|
|
6
|
+
module.exports = function (string, tag, attribute, value) {
|
|
7
|
+
var S = String(requireObjectCoercible(string));
|
|
8
|
+
var p1 = '<' + tag;
|
|
9
|
+
if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"';
|
|
10
|
+
return p1 + '>' + S + '</' + tag + '>';
|
|
11
|
+
};
|
|
@@ -3,6 +3,7 @@ var anObject = require('../internals/an-object');
|
|
|
3
3
|
var toPrimitive = require('../internals/to-primitive');
|
|
4
4
|
|
|
5
5
|
module.exports = function (hint) {
|
|
6
|
-
if (hint !== 'string' && hint !== 'number' && hint !== 'default')
|
|
7
|
-
|
|
6
|
+
if (hint !== 'string' && hint !== 'number' && hint !== 'default') {
|
|
7
|
+
throw TypeError('Incorrect hint');
|
|
8
|
+
} return toPrimitive(anObject(this), hint !== 'number');
|
|
8
9
|
};
|
package/internals/export.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
var global = require('../internals/global');
|
|
2
|
+
var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;
|
|
2
3
|
var hide = require('../internals/hide');
|
|
3
4
|
var redefine = require('../internals/redefine');
|
|
4
5
|
var setGlobal = require('../internals/set-global');
|
|
@@ -6,23 +7,24 @@ var copyConstructorProperties = require('../internals/copy-constructor-propertie
|
|
|
6
7
|
var isForced = require('../internals/is-forced');
|
|
7
8
|
|
|
8
9
|
/*
|
|
9
|
-
options.target
|
|
10
|
-
options.global
|
|
11
|
-
options.stat
|
|
12
|
-
options.proto
|
|
13
|
-
options.real
|
|
14
|
-
options.forced
|
|
15
|
-
options.bind
|
|
16
|
-
options.wrap
|
|
17
|
-
options.unsafe
|
|
18
|
-
options.sham
|
|
19
|
-
options.enumerable
|
|
10
|
+
options.target - name of the target object
|
|
11
|
+
options.global - target is the global object
|
|
12
|
+
options.stat - export as static methods of target
|
|
13
|
+
options.proto - export as prototype methods of target
|
|
14
|
+
options.real - real prototype method for the `pure` version
|
|
15
|
+
options.forced - export even if the native feature is available
|
|
16
|
+
options.bind - bind methods to the target, required for the `pure` version
|
|
17
|
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
18
|
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
19
|
+
options.sham - add a flag to not completely full polyfills
|
|
20
|
+
options.enumerable - export as enumerable property
|
|
21
|
+
options.noTargetGet - prevent calling a getter on target
|
|
20
22
|
*/
|
|
21
23
|
module.exports = function (options, source) {
|
|
22
24
|
var TARGET = options.target;
|
|
23
25
|
var GLOBAL = options.global;
|
|
24
26
|
var STATIC = options.stat;
|
|
25
|
-
var FORCED, target, key, targetProperty, sourceProperty;
|
|
27
|
+
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
26
28
|
if (GLOBAL) {
|
|
27
29
|
target = global;
|
|
28
30
|
} else if (STATIC) {
|
|
@@ -31,8 +33,11 @@ module.exports = function (options, source) {
|
|
|
31
33
|
target = (global[TARGET] || {}).prototype;
|
|
32
34
|
}
|
|
33
35
|
if (target) for (key in source) {
|
|
34
|
-
targetProperty = target[key];
|
|
35
36
|
sourceProperty = source[key];
|
|
37
|
+
if (options.noTargetGet) {
|
|
38
|
+
descriptor = getOwnPropertyDescriptor(target, key);
|
|
39
|
+
targetProperty = descriptor && descriptor.value;
|
|
40
|
+
} else targetProperty = target[key];
|
|
36
41
|
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
37
42
|
// contained in target
|
|
38
43
|
if (!FORCED && targetProperty !== undefined) {
|
package/internals/fails.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
var hide = require('../internals/hide');
|
|
3
3
|
var redefine = require('../internals/redefine');
|
|
4
4
|
var fails = require('../internals/fails');
|
|
5
|
-
var requireObjectCoercible = require('../internals/require-object-coercible');
|
|
6
5
|
var wellKnownSymbol = require('../internals/well-known-symbol');
|
|
7
6
|
var regexpExec = require('../internals/regexp-exec');
|
|
8
7
|
|
|
@@ -21,14 +20,15 @@ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
|
|
21
20
|
return ''.replace(re, '$<a>') !== '7';
|
|
22
21
|
});
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
|
24
|
+
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
|
25
|
+
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
|
26
26
|
var re = /(?:)/;
|
|
27
27
|
var originalExec = re.exec;
|
|
28
28
|
re.exec = function () { return originalExec.apply(this, arguments); };
|
|
29
29
|
var result = 'ab'.split(re);
|
|
30
|
-
return result.length
|
|
31
|
-
})
|
|
30
|
+
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
|
31
|
+
});
|
|
32
32
|
|
|
33
33
|
module.exports = function (KEY, length, exec, sham) {
|
|
34
34
|
var SYMBOL = wellKnownSymbol(KEY);
|
|
@@ -40,7 +40,7 @@ module.exports = function (KEY, length, exec, sham) {
|
|
|
40
40
|
return ''[KEY](O) != 7;
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
-
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL
|
|
43
|
+
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
|
|
44
44
|
// Symbol-named RegExp methods call .exec
|
|
45
45
|
var execCalled = false;
|
|
46
46
|
var re = /a/;
|
|
@@ -55,7 +55,7 @@ module.exports = function (KEY, length, exec, sham) {
|
|
|
55
55
|
|
|
56
56
|
re[SYMBOL]('');
|
|
57
57
|
return !execCalled;
|
|
58
|
-
})
|
|
58
|
+
});
|
|
59
59
|
|
|
60
60
|
if (
|
|
61
61
|
!DELEGATES_TO_SYMBOL ||
|
|
@@ -64,23 +64,18 @@ module.exports = function (KEY, length, exec, sham) {
|
|
|
64
64
|
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
|
65
65
|
) {
|
|
66
66
|
var nativeRegExpMethod = /./[SYMBOL];
|
|
67
|
-
var methods = exec(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
// The native String method already delegates to @@method (this
|
|
75
|
-
// polyfilled function), leasing to infinite recursion.
|
|
76
|
-
// We avoid it by directly calling the native @@method method.
|
|
77
|
-
return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
|
|
78
|
-
}
|
|
79
|
-
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
|
|
67
|
+
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
|
68
|
+
if (regexp.exec === regexpExec) {
|
|
69
|
+
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
|
70
|
+
// The native String method already delegates to @@method (this
|
|
71
|
+
// polyfilled function), leasing to infinite recursion.
|
|
72
|
+
// We avoid it by directly calling the native @@method method.
|
|
73
|
+
return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
|
|
80
74
|
}
|
|
81
|
-
return { done:
|
|
75
|
+
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
|
|
82
76
|
}
|
|
83
|
-
|
|
77
|
+
return { done: false };
|
|
78
|
+
});
|
|
84
79
|
var stringMethod = methods[0];
|
|
85
80
|
var regexMethod = methods[1];
|
|
86
81
|
|
|
@@ -18,7 +18,7 @@ var flattenIntoArray = function (target, original, source, sourceLen, start, dep
|
|
|
18
18
|
if (depth > 0 && isArray(element)) {
|
|
19
19
|
targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;
|
|
20
20
|
} else {
|
|
21
|
-
if (targetIndex >=
|
|
21
|
+
if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
|
|
22
22
|
target[targetIndex] = element;
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
// Forced replacement prototype accessors methods
|
|
2
|
+
// Forced replacement object prototype accessors methods
|
|
3
3
|
module.exports = require('../internals/is-pure') || !require('../internals/fails')(function () {
|
|
4
|
-
var
|
|
4
|
+
var key = Math.random();
|
|
5
5
|
// In FF throws only define methods
|
|
6
6
|
// eslint-disable-next-line no-undef, no-useless-call
|
|
7
|
-
__defineSetter__.call(null,
|
|
8
|
-
delete require('../internals/global')[
|
|
7
|
+
__defineSetter__.call(null, key, function () { /* empty */ });
|
|
8
|
+
delete require('../internals/global')[key];
|
|
9
9
|
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var fails = require('../internals/fails');
|
|
2
|
+
|
|
3
|
+
// check the existence of a method, lowercase
|
|
4
|
+
// of a tag and escaping quotes in arguments
|
|
5
|
+
module.exports = function (METHOD_NAME) {
|
|
6
|
+
return fails(function () {
|
|
7
|
+
var test = ''[METHOD_NAME]('"');
|
|
8
|
+
return test !== test.toLowerCase() || test.split('"').length > 3;
|
|
9
|
+
});
|
|
10
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var fails = require('../internals/fails');
|
|
2
|
+
var whitespaces = require('../internals/whitespaces');
|
|
3
|
+
var non = '\u200B\u0085\u180E';
|
|
4
|
+
|
|
5
|
+
// check that a method works with the correct list
|
|
6
|
+
// of whitespaces and has a correct name
|
|
7
|
+
module.exports = function (METHOD_NAME) {
|
|
8
|
+
return fails(function () {
|
|
9
|
+
return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
|
|
10
|
+
});
|
|
11
|
+
};
|
|
@@ -4,12 +4,12 @@ var isObject = require('../internals/is-object');
|
|
|
4
4
|
var arraySlice = [].slice;
|
|
5
5
|
var factories = {};
|
|
6
6
|
|
|
7
|
-
var construct = function (
|
|
8
|
-
if (!(
|
|
9
|
-
for (var
|
|
7
|
+
var construct = function (C, argsLength, args) {
|
|
8
|
+
if (!(argsLength in factories)) {
|
|
9
|
+
for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
|
|
10
10
|
// eslint-disable-next-line no-new-func
|
|
11
|
-
factories[
|
|
12
|
-
} return factories[
|
|
11
|
+
factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');
|
|
12
|
+
} return factories[argsLength](C, args);
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
// `Function.prototype.bind` method implementation
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var path = require('../internals/path');
|
|
2
|
+
var global = require('../internals/global');
|
|
3
|
+
|
|
4
|
+
var aFunction = function (variable) {
|
|
5
|
+
return typeof variable == 'function' ? variable : undefined;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
module.exports = function (namespace, method) {
|
|
9
|
+
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
|
|
10
|
+
: path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
|
|
11
|
+
};
|
|
@@ -3,6 +3,7 @@ var getIteratorMethod = require('../internals/get-iterator-method');
|
|
|
3
3
|
|
|
4
4
|
module.exports = function (it) {
|
|
5
5
|
var iteratorMethod = getIteratorMethod(it);
|
|
6
|
-
if (typeof iteratorMethod != 'function')
|
|
7
|
-
|
|
6
|
+
if (typeof iteratorMethod != 'function') {
|
|
7
|
+
throw TypeError(String(it) + ' is not iterable');
|
|
8
|
+
} return anObject(iteratorMethod.call(it));
|
|
8
9
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var IS_PURE = require('../internals/is-pure');
|
|
2
2
|
var getIterator = require('../internals/get-iterator');
|
|
3
3
|
|
|
4
|
-
module.exports = function (it) {
|
|
4
|
+
module.exports = IS_PURE ? getIterator : function (it) {
|
|
5
5
|
// eslint-disable-next-line no-undef
|
|
6
|
-
return
|
|
6
|
+
return Map.prototype.entries.call(it);
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var IS_PURE = require('../internals/is-pure');
|
|
2
2
|
var getIterator = require('../internals/get-iterator');
|
|
3
3
|
|
|
4
|
-
module.exports = function (it) {
|
|
4
|
+
module.exports = IS_PURE ? getIterator : function (it) {
|
|
5
5
|
// eslint-disable-next-line no-undef
|
|
6
|
-
return
|
|
6
|
+
return Set.prototype.values.call(it);
|
|
7
7
|
};
|
package/internals/global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
2
|
-
module.exports = typeof window
|
|
3
|
-
|
|
2
|
+
module.exports = typeof window == 'object' && window && window.Math == Math ? window
|
|
3
|
+
: typeof self == 'object' && self && self.Math == Math ? self
|
|
4
4
|
// eslint-disable-next-line no-new-func
|
|
5
5
|
: Function('return this')();
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var nativeFunctionToString = require('../internals/function-to-string');
|
|
1
|
+
var NATIVE_WEAK_MAP = require('../internals/native-weak-map');
|
|
3
2
|
var isObject = require('../internals/is-object');
|
|
4
3
|
var hide = require('../internals/hide');
|
|
5
4
|
var objectHas = require('../internals/has');
|
|
6
5
|
var sharedKey = require('../internals/shared-key');
|
|
7
6
|
var hiddenKeys = require('../internals/hidden-keys');
|
|
8
|
-
var WeakMap = global.WeakMap;
|
|
7
|
+
var WeakMap = require('../internals/global').WeakMap;
|
|
9
8
|
var set, get, has;
|
|
10
9
|
|
|
11
10
|
var enforce = function (it) {
|
|
@@ -16,12 +15,12 @@ var getterFor = function (TYPE) {
|
|
|
16
15
|
return function (it) {
|
|
17
16
|
var state;
|
|
18
17
|
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
19
|
-
throw TypeError('Incompatible receiver, ' + TYPE + ' required
|
|
18
|
+
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
20
19
|
} return state;
|
|
21
20
|
};
|
|
22
21
|
};
|
|
23
22
|
|
|
24
|
-
if (
|
|
23
|
+
if (NATIVE_WEAK_MAP) {
|
|
25
24
|
var store = new WeakMap();
|
|
26
25
|
var wmget = store.get;
|
|
27
26
|
var wmhas = store.has;
|
package/internals/iterate.js
CHANGED
|
@@ -14,7 +14,7 @@ var exports = module.exports = function (iterable, fn, that, ENTRIES, ITERATOR)
|
|
|
14
14
|
iterator = iterable;
|
|
15
15
|
} else {
|
|
16
16
|
iterFn = getIteratorMethod(iterable);
|
|
17
|
-
if (typeof iterFn != 'function') throw TypeError('Target is not iterable
|
|
17
|
+
if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
|
|
18
18
|
// optimisation for array iterators
|
|
19
19
|
if (isArrayIteratorMethod(iterFn)) {
|
|
20
20
|
for (index = 0, length = toLength(iterable.length); length > index; index++) {
|
package/internals/math-scale.js
CHANGED
|
@@ -3,16 +3,13 @@
|
|
|
3
3
|
module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) {
|
|
4
4
|
if (
|
|
5
5
|
arguments.length === 0
|
|
6
|
-
|
|
6
|
+
/* eslint-disable no-self-compare */
|
|
7
7
|
|| x != x
|
|
8
|
-
// eslint-disable-next-line no-self-compare
|
|
9
8
|
|| inLow != inLow
|
|
10
|
-
// eslint-disable-next-line no-self-compare
|
|
11
9
|
|| inHigh != inHigh
|
|
12
|
-
// eslint-disable-next-line no-self-compare
|
|
13
10
|
|| outLow != outLow
|
|
14
|
-
// eslint-disable-next-line no-self-compare
|
|
15
11
|
|| outHigh != outHigh
|
|
12
|
+
/* eslint-enable no-self-compare */
|
|
16
13
|
) return NaN;
|
|
17
14
|
if (x === Infinity || x === -Infinity) return x;
|
|
18
15
|
return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow;
|