core-js 3.0.0-beta.6 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +19 -1
- package/es/array/flat-map.js +4 -0
- package/es/array/flat.js +4 -0
- package/es/array/index.js +21 -17
- package/es/array/virtual/flat-map.js +4 -0
- package/es/array/virtual/flat.js +4 -0
- package/es/array/virtual/index.js +7 -2
- package/es/index.js +8 -0
- package/es/instance/bind.js +7 -0
- package/es/instance/code-point-at.js +8 -0
- package/es/instance/concat.js +7 -0
- package/es/instance/copy-within.js +7 -0
- package/es/instance/ends-with.js +8 -0
- package/es/instance/entries.js +7 -0
- package/es/instance/every.js +7 -0
- package/es/instance/fill.js +7 -0
- package/es/instance/filter.js +7 -0
- package/es/instance/find-index.js +7 -0
- package/es/instance/find.js +7 -0
- package/es/instance/flags.js +6 -0
- package/es/instance/flat-map.js +7 -0
- package/es/instance/flat.js +7 -0
- package/es/instance/for-each.js +7 -0
- package/es/instance/includes.js +12 -0
- package/es/instance/index-of.js +7 -0
- package/es/instance/keys.js +7 -0
- package/es/instance/last-index-of.js +7 -0
- package/es/instance/map.js +7 -0
- package/es/instance/pad-end.js +8 -0
- package/es/instance/pad-start.js +8 -0
- package/es/instance/reduce-right.js +7 -0
- package/es/instance/reduce.js +7 -0
- package/es/instance/repeat.js +8 -0
- package/es/instance/reverse.js +7 -0
- package/es/instance/slice.js +7 -0
- package/es/instance/some.js +7 -0
- package/es/instance/sort.js +7 -0
- package/es/instance/splice.js +7 -0
- package/es/instance/starts-with.js +8 -0
- package/es/instance/trim-end.js +8 -0
- package/es/instance/trim-left.js +8 -0
- package/es/instance/trim-right.js +8 -0
- package/es/instance/trim-start.js +8 -0
- package/es/instance/trim.js +8 -0
- package/es/instance/values.js +7 -0
- package/es/object/from-entries.js +4 -0
- package/es/object/index.js +1 -0
- package/es/string/index.js +2 -0
- package/es/string/trim-end.js +3 -0
- package/es/string/trim-left.js +3 -0
- package/es/string/trim-right.js +3 -0
- package/es/string/trim-start.js +3 -0
- package/es/string/virtual/index.js +2 -0
- package/es/string/virtual/trim-end.js +3 -0
- package/es/string/virtual/trim-left.js +3 -0
- package/es/string/virtual/trim-right.js +3 -0
- package/es/string/virtual/trim-start.js +3 -0
- package/features/aggregate-error.js +5 -0
- package/features/array/flat-map.js +1 -3
- package/features/array/flat.js +1 -3
- package/features/array/index.js +0 -2
- package/features/array/virtual/flat-map.js +1 -3
- package/features/array/virtual/flat.js +1 -3
- package/features/array/virtual/index.js +0 -3
- package/features/clear-immediate.js +1 -3
- package/features/index.js +1 -0
- package/features/instance/at.js +8 -0
- package/features/instance/bind.js +1 -0
- package/features/instance/code-point-at.js +1 -0
- package/features/instance/code-points.js +8 -0
- package/features/instance/concat.js +1 -0
- package/features/instance/copy-within.js +1 -0
- package/features/instance/ends-with.js +1 -0
- package/features/instance/entries.js +1 -0
- package/features/instance/every.js +1 -0
- package/features/instance/fill.js +1 -0
- package/features/instance/filter.js +1 -0
- package/features/instance/find-index.js +1 -0
- package/features/instance/find.js +1 -0
- package/features/instance/flags.js +1 -0
- package/features/instance/flat-map.js +1 -0
- package/features/instance/flat.js +1 -0
- package/features/instance/for-each.js +1 -0
- package/features/instance/includes.js +1 -0
- package/features/instance/index-of.js +1 -0
- package/features/instance/keys.js +1 -0
- package/features/instance/last-index-of.js +1 -0
- package/features/instance/map.js +1 -0
- package/features/instance/match-all.js +8 -0
- package/features/instance/pad-end.js +1 -0
- package/features/instance/pad-start.js +1 -0
- package/features/instance/reduce-right.js +1 -0
- package/features/instance/reduce.js +1 -0
- package/features/instance/repeat.js +1 -0
- package/features/instance/replace-all.js +8 -0
- package/features/instance/reverse.js +1 -0
- package/features/instance/slice.js +1 -0
- package/features/instance/some.js +1 -0
- package/features/instance/sort.js +1 -0
- package/features/instance/splice.js +1 -0
- package/features/instance/starts-with.js +1 -0
- package/features/instance/trim-end.js +1 -0
- package/features/instance/trim-left.js +1 -0
- package/features/instance/trim-right.js +1 -0
- package/features/instance/trim-start.js +1 -0
- package/features/instance/trim.js +1 -0
- package/features/instance/values.js +1 -0
- package/features/map/index.js +1 -0
- package/features/map/update.js +4 -0
- package/features/object/from-entries.js +1 -4
- package/features/object/index.js +0 -2
- package/features/promise/any.js +10 -0
- package/features/promise/index.js +2 -0
- package/features/queue-microtask.js +1 -3
- package/features/reflect/delete-property.js +1 -3
- package/features/set/index.js +1 -1
- package/features/set/{is-disjoint-with.js → is-disjoint-from.js} +2 -2
- package/features/set-immediate.js +1 -3
- package/features/set-interval.js +1 -3
- package/features/set-timeout.js +1 -3
- package/features/string/index.js +0 -2
- package/features/string/trim-end.js +1 -3
- package/features/string/trim-left.js +1 -3
- package/features/string/trim-right.js +1 -3
- package/features/string/trim-start.js +1 -3
- package/features/string/virtual/index.js +0 -2
- package/features/string/virtual/trim-end.js +1 -3
- package/features/string/virtual/trim-left.js +1 -3
- package/features/string/virtual/trim-right.js +1 -3
- package/features/string/virtual/trim-start.js +1 -3
- package/index.js +4 -285
- package/internals/a-function.js +3 -2
- package/internals/add-to-unscopables.js +3 -1
- package/internals/advance-string-index.js +2 -2
- package/internals/an-instance.js +1 -1
- package/internals/an-object.js +3 -2
- package/internals/array-buffer-view-core.js +12 -6
- package/internals/array-buffer.js +4 -4
- package/internals/array-for-each.js +5 -3
- package/internals/array-from.js +5 -2
- package/internals/array-last-index-of.js +2 -1
- package/internals/{check-array-species-create.js → array-method-has-species-support.js} +2 -2
- package/internals/array-reduce.js +2 -2
- package/internals/collection-delete-all.js +3 -3
- package/internals/collection-from.js +25 -0
- package/internals/collection-of.js +8 -0
- package/internals/collection-strong.js +9 -9
- package/internals/collection-weak.js +4 -4
- package/internals/collection.js +9 -9
- package/internals/create-html.js +11 -0
- package/internals/date-to-primitive.js +3 -2
- package/internals/export.js +18 -13
- package/internals/fix-regexp-well-known-symbol-logic.js +17 -22
- package/internals/{object-forced-pam.js → forced-object-prototype-accessors-methods.js} +4 -4
- package/internals/forced-string-html-method.js +10 -0
- package/internals/forced-string-trim-method.js +11 -0
- package/internals/function-bind.js +5 -5
- package/internals/get-built-in.js +11 -0
- package/internals/get-iterator.js +3 -2
- package/internals/get-map-iterator.js +2 -2
- package/internals/get-set-iterator.js +2 -2
- package/internals/global.js +2 -2
- package/internals/internal-state.js +4 -5
- package/internals/iterate.js +1 -1
- package/internals/math-scale.js +2 -5
- package/internals/microtask.js +11 -8
- package/internals/native-weak-map.js +4 -0
- package/internals/object-assign.js +5 -5
- package/internals/object-create.js +4 -2
- package/internals/object-define-property.js +1 -1
- package/internals/object-set-prototype-of.js +2 -2
- package/internals/object-to-array.js +12 -12
- package/internals/parse-float.js +1 -1
- package/internals/parse-int.js +1 -1
- package/internals/punycode-to-ascii.js +2 -2
- package/internals/redefine.js +4 -2
- package/internals/reflect-metadata.js +10 -10
- package/internals/regexp-exec-abstract.js +2 -2
- package/internals/regexp-exec.js +3 -5
- package/internals/require-object-coercible.js +1 -1
- package/internals/set-species.js +5 -4
- package/internals/shared.js +2 -2
- package/internals/sloppy-array-method.js +10 -0
- package/internals/string-at.js +13 -15
- package/internals/string-pad.js +3 -2
- package/internals/string-repeat.js +1 -1
- package/internals/string-trim.js +6 -20
- package/internals/this-number-value.js +3 -1
- package/internals/to-index.js +1 -1
- package/internals/to-offset.js +1 -1
- package/internals/typed-array-constructor.js +9 -9
- package/internals/typed-array-from.js +12 -6
- package/internals/typed-arrays-constructors-requires-wrappers.js +6 -5
- package/internals/validate-set-prototype-of-arguments.js +3 -1
- package/internals/validate-string-method-arguments.js +3 -2
- package/internals/well-known-symbol.js +3 -2
- package/modules/es.array-buffer.is-view.js +4 -3
- package/modules/es.array.concat.js +11 -8
- package/modules/es.array.every.js +1 -1
- package/modules/es.array.filter.js +1 -3
- package/modules/{esnext.array.flat-map.js → es.array.flat-map.js} +0 -2
- package/modules/{esnext.array.flat.js → es.array.flat.js} +0 -2
- package/modules/es.array.index-of.js +1 -1
- package/modules/es.array.join.js +1 -1
- package/modules/es.array.map.js +1 -3
- package/modules/es.array.reduce-right.js +1 -1
- package/modules/es.array.reduce.js +1 -1
- package/modules/es.array.slice.js +4 -4
- package/modules/es.array.some.js +1 -1
- package/modules/es.array.sort.js +7 -7
- package/modules/es.array.splice.js +9 -5
- package/modules/es.array.unscopables.flat-map.js +3 -0
- package/modules/es.array.unscopables.flat.js +3 -0
- package/modules/es.date.to-json.js +6 -4
- package/modules/es.function.name.js +12 -9
- package/modules/es.math.acosh.js +7 -6
- package/modules/es.math.asinh.js +3 -3
- package/modules/es.math.imul.js +5 -3
- package/modules/es.math.sinh.js +5 -3
- package/modules/es.number.constructor.js +7 -5
- package/modules/es.number.to-fixed.js +1 -1
- package/modules/es.object.define-getter.js +2 -1
- package/modules/es.object.define-setter.js +2 -1
- package/modules/es.object.entries.js +2 -2
- package/modules/es.object.freeze.js +6 -4
- package/modules/{esnext.object.from-entries.js → es.object.from-entries.js} +0 -0
- package/modules/es.object.get-own-property-descriptor.js +7 -5
- package/modules/es.object.get-own-property-names.js +5 -2
- package/modules/es.object.get-prototype-of.js +8 -4
- package/modules/es.object.is-extensible.js +5 -3
- package/modules/es.object.is-frozen.js +5 -3
- package/modules/es.object.is-sealed.js +5 -3
- package/modules/es.object.keys.js +4 -3
- package/modules/es.object.lookup-getter.js +5 -4
- package/modules/es.object.lookup-setter.js +5 -4
- package/modules/es.object.prevent-extensions.js +6 -4
- package/modules/es.object.seal.js +6 -4
- package/modules/es.object.to-string.js +3 -2
- package/modules/es.object.values.js +2 -2
- package/modules/es.promise.finally.js +15 -14
- package/modules/es.promise.js +15 -4
- package/modules/es.reflect.apply.js +5 -3
- package/modules/es.reflect.get.js +3 -3
- package/modules/es.reflect.prevent-extensions.js +3 -2
- package/modules/es.regexp.constructor.js +9 -5
- package/modules/es.regexp.exec.js +1 -5
- package/modules/es.string.anchor.js +6 -3
- package/modules/es.string.big.js +6 -3
- package/modules/es.string.blink.js +6 -3
- package/modules/es.string.bold.js +6 -3
- package/modules/es.string.code-point-at.js +1 -1
- package/modules/es.string.fixed.js +6 -3
- package/modules/es.string.fontcolor.js +6 -3
- package/modules/es.string.fontsize.js +6 -3
- package/modules/es.string.italics.js +6 -3
- package/modules/es.string.iterator.js +2 -2
- package/modules/es.string.link.js +6 -3
- package/modules/es.string.match.js +3 -2
- package/modules/es.string.replace.js +6 -5
- package/modules/es.string.search.js +3 -2
- package/modules/es.string.small.js +6 -3
- package/modules/es.string.split.js +27 -24
- package/modules/es.string.strike.js +6 -3
- package/modules/es.string.sub.js +6 -3
- package/modules/es.string.sup.js +6 -3
- package/modules/es.string.trim-end.js +14 -0
- package/modules/es.string.trim-start.js +14 -0
- package/modules/es.string.trim.js +7 -4
- package/modules/es.symbol.js +11 -11
- package/modules/es.typed-array.fill.js +2 -1
- package/modules/es.typed-array.join.js +2 -1
- package/modules/es.typed-array.set.js +1 -1
- package/modules/es.weak-map.js +8 -6
- package/modules/esnext.aggregate-error.js +27 -0
- package/modules/esnext.array.last-index.js +2 -0
- package/modules/esnext.array.last-item.js +2 -0
- package/modules/esnext.composite-key.js +3 -3
- package/modules/esnext.composite-symbol.js +4 -9
- package/modules/esnext.map.delete-all.js +1 -1
- package/modules/esnext.map.every.js +1 -1
- package/modules/esnext.map.filter.js +3 -3
- package/modules/esnext.map.find-key.js +1 -1
- package/modules/esnext.map.find.js +1 -1
- package/modules/esnext.map.from.js +3 -1
- package/modules/esnext.map.group-by.js +8 -3
- package/modules/esnext.map.includes.js +1 -1
- package/modules/esnext.map.key-by.js +5 -2
- package/modules/esnext.map.key-of.js +1 -1
- package/modules/esnext.map.map-keys.js +3 -3
- package/modules/esnext.map.map-values.js +3 -3
- package/modules/esnext.map.merge.js +9 -9
- package/modules/esnext.map.of.js +3 -1
- package/modules/esnext.map.reduce.js +2 -2
- package/modules/esnext.map.some.js +1 -1
- package/modules/esnext.map.update.js +19 -0
- package/modules/esnext.number.from-string.js +8 -8
- package/modules/esnext.promise.all-settled.js +3 -3
- package/modules/esnext.promise.any.js +42 -0
- package/modules/esnext.reflect.define-metadata.js +7 -4
- package/modules/esnext.reflect.delete-metadata.js +13 -11
- package/modules/esnext.reflect.get-metadata-keys.js +7 -4
- package/modules/esnext.reflect.get-metadata.js +7 -4
- package/modules/esnext.reflect.get-own-metadata-keys.js +7 -4
- package/modules/esnext.reflect.get-own-metadata.js +7 -5
- package/modules/esnext.reflect.has-metadata.js +7 -4
- package/modules/esnext.reflect.has-own-metadata.js +7 -5
- package/modules/esnext.reflect.metadata.js +8 -11
- package/modules/esnext.set.add-all.js +1 -1
- package/modules/esnext.set.delete-all.js +1 -1
- package/modules/esnext.set.difference.js +2 -3
- package/modules/esnext.set.every.js +1 -1
- package/modules/esnext.set.filter.js +3 -3
- package/modules/esnext.set.find.js +1 -1
- package/modules/esnext.set.from.js +3 -1
- package/modules/esnext.set.intersection.js +2 -3
- package/modules/esnext.set.is-disjoint-from.js +17 -0
- package/modules/esnext.set.is-subset-of.js +16 -2
- package/modules/esnext.set.is-superset-of.js +0 -2
- package/modules/esnext.set.join.js +1 -1
- package/modules/esnext.set.map.js +3 -3
- package/modules/esnext.set.of.js +3 -1
- package/modules/esnext.set.reduce.js +2 -2
- package/modules/esnext.set.some.js +1 -1
- package/modules/esnext.set.symmetric-difference.js +2 -3
- package/modules/esnext.set.union.js +2 -3
- package/modules/esnext.string.at.js +2 -2
- package/modules/esnext.string.code-points.js +3 -5
- package/modules/esnext.string.match-all.js +3 -3
- package/modules/esnext.string.replace-all.js +14 -5
- package/modules/esnext.weak-map.delete-all.js +1 -1
- package/modules/esnext.weak-map.from.js +3 -1
- package/modules/esnext.weak-map.of.js +3 -1
- package/modules/esnext.weak-set.add-all.js +1 -1
- package/modules/esnext.weak-set.delete-all.js +1 -1
- package/modules/esnext.weak-set.from.js +3 -1
- package/modules/esnext.weak-set.of.js +3 -1
- package/modules/web.immediate.js +2 -1
- package/modules/web.queue-microtask.js +1 -1
- package/modules/web.url-search-params.js +2 -2
- package/modules/web.url.js +5 -5
- package/package.json +6 -1
- package/proposals/collection-methods.js +1 -0
- package/proposals/{richer-keys.js → keys-composition.js} +0 -0
- package/proposals/promise-any.js +2 -0
- package/proposals/set-methods.js +1 -1
- package/stable/README.md +1 -0
- package/stable/array/concat.js +1 -0
- package/stable/array/copy-within.js +1 -0
- package/stable/array/entries.js +1 -0
- package/stable/array/every.js +1 -0
- package/stable/array/fill.js +1 -0
- package/stable/array/filter.js +1 -0
- package/stable/array/find-index.js +1 -0
- package/stable/array/find.js +1 -0
- package/stable/array/flat-map.js +1 -0
- package/stable/array/flat.js +1 -0
- package/stable/array/for-each.js +1 -0
- package/stable/array/from.js +1 -0
- package/stable/array/includes.js +1 -0
- package/stable/array/index-of.js +1 -0
- package/stable/array/index.js +1 -0
- package/stable/array/is-array.js +1 -0
- package/stable/array/iterator.js +1 -0
- package/stable/array/join.js +1 -0
- package/stable/array/keys.js +1 -0
- package/stable/array/last-index-of.js +1 -0
- package/stable/array/map.js +1 -0
- package/stable/array/of.js +1 -0
- package/stable/array/reduce-right.js +1 -0
- package/stable/array/reduce.js +1 -0
- package/stable/array/reverse.js +1 -0
- package/stable/array/slice.js +1 -0
- package/stable/array/some.js +1 -0
- package/stable/array/sort.js +1 -0
- package/stable/array/splice.js +1 -0
- package/stable/array/values.js +1 -0
- package/stable/array/virtual/concat.js +1 -0
- package/stable/array/virtual/copy-within.js +1 -0
- package/stable/array/virtual/entries.js +1 -0
- package/stable/array/virtual/every.js +1 -0
- package/stable/array/virtual/fill.js +1 -0
- package/stable/array/virtual/filter.js +1 -0
- package/stable/array/virtual/find-index.js +1 -0
- package/stable/array/virtual/find.js +1 -0
- package/stable/array/virtual/flat-map.js +1 -0
- package/stable/array/virtual/flat.js +1 -0
- package/stable/array/virtual/for-each.js +1 -0
- package/stable/array/virtual/includes.js +1 -0
- package/stable/array/virtual/index-of.js +1 -0
- package/stable/array/virtual/index.js +1 -0
- package/stable/array/virtual/iterator.js +1 -0
- package/stable/array/virtual/join.js +1 -0
- package/stable/array/virtual/keys.js +1 -0
- package/stable/array/virtual/last-index-of.js +1 -0
- package/stable/array/virtual/map.js +1 -0
- package/stable/array/virtual/reduce-right.js +1 -0
- package/stable/array/virtual/reduce.js +1 -0
- package/stable/array/virtual/reverse.js +1 -0
- package/stable/array/virtual/slice.js +1 -0
- package/stable/array/virtual/some.js +1 -0
- package/stable/array/virtual/sort.js +1 -0
- package/stable/array/virtual/splice.js +1 -0
- package/stable/array/virtual/values.js +1 -0
- package/stable/array-buffer/constructor.js +1 -0
- package/stable/array-buffer/index.js +1 -0
- package/stable/array-buffer/is-view.js +1 -0
- package/stable/array-buffer/slice.js +1 -0
- package/stable/clear-immediate.js +3 -0
- package/stable/data-view/index.js +1 -0
- package/stable/date/index.js +1 -0
- package/stable/date/now.js +1 -0
- package/stable/date/to-iso-string.js +1 -0
- package/stable/date/to-json.js +1 -0
- package/stable/date/to-primitive.js +1 -0
- package/stable/date/to-string.js +1 -0
- package/stable/dom-collections/for-each.js +3 -0
- package/stable/dom-collections/index.js +11 -0
- package/stable/dom-collections/iterator.js +3 -0
- package/stable/function/bind.js +1 -0
- package/stable/function/has-instance.js +1 -0
- package/stable/function/index.js +1 -0
- package/stable/function/name.js +1 -0
- package/stable/function/virtual/bind.js +1 -0
- package/stable/function/virtual/index.js +1 -0
- package/stable/global-this.js +3 -0
- package/stable/index.js +4 -0
- package/stable/instance/bind.js +1 -0
- package/stable/instance/code-point-at.js +1 -0
- package/stable/instance/concat.js +1 -0
- package/stable/instance/copy-within.js +1 -0
- package/stable/instance/ends-with.js +1 -0
- package/stable/instance/entries.js +16 -0
- package/stable/instance/every.js +1 -0
- package/stable/instance/fill.js +1 -0
- package/stable/instance/filter.js +1 -0
- package/stable/instance/find-index.js +1 -0
- package/stable/instance/find.js +1 -0
- package/stable/instance/flags.js +1 -0
- package/stable/instance/flat-map.js +1 -0
- package/stable/instance/flat.js +1 -0
- package/stable/instance/for-each.js +16 -0
- package/stable/instance/includes.js +1 -0
- package/stable/instance/index-of.js +1 -0
- package/stable/instance/keys.js +16 -0
- package/stable/instance/last-index-of.js +1 -0
- package/stable/instance/map.js +1 -0
- package/stable/instance/pad-end.js +1 -0
- package/stable/instance/pad-start.js +1 -0
- package/stable/instance/reduce-right.js +1 -0
- package/stable/instance/reduce.js +1 -0
- package/stable/instance/repeat.js +1 -0
- package/stable/instance/reverse.js +1 -0
- package/stable/instance/slice.js +1 -0
- package/stable/instance/some.js +1 -0
- package/stable/instance/sort.js +1 -0
- package/stable/instance/splice.js +1 -0
- package/stable/instance/starts-with.js +1 -0
- package/stable/instance/trim-end.js +1 -0
- package/stable/instance/trim-left.js +1 -0
- package/stable/instance/trim-right.js +1 -0
- package/stable/instance/trim-start.js +1 -0
- package/stable/instance/trim.js +1 -0
- package/stable/instance/values.js +16 -0
- package/stable/json/index.js +1 -0
- package/stable/json/stringify.js +1 -0
- package/stable/json/to-string-tag.js +1 -0
- package/stable/map/index.js +1 -0
- package/stable/math/acosh.js +1 -0
- package/stable/math/asinh.js +1 -0
- package/stable/math/atanh.js +1 -0
- package/stable/math/cbrt.js +1 -0
- package/stable/math/clz32.js +1 -0
- package/stable/math/cosh.js +1 -0
- package/stable/math/expm1.js +1 -0
- package/stable/math/fround.js +1 -0
- package/stable/math/hypot.js +1 -0
- package/stable/math/imul.js +1 -0
- package/stable/math/index.js +1 -0
- package/stable/math/log10.js +1 -0
- package/stable/math/log1p.js +1 -0
- package/stable/math/log2.js +1 -0
- package/stable/math/sign.js +1 -0
- package/stable/math/sinh.js +1 -0
- package/stable/math/tanh.js +1 -0
- package/stable/math/to-string-tag.js +1 -0
- package/stable/math/trunc.js +1 -0
- package/stable/number/constructor.js +1 -0
- package/stable/number/epsilon.js +1 -0
- package/stable/number/index.js +1 -0
- package/stable/number/is-finite.js +1 -0
- package/stable/number/is-integer.js +1 -0
- package/stable/number/is-nan.js +1 -0
- package/stable/number/is-safe-integer.js +1 -0
- package/stable/number/max-safe-integer.js +1 -0
- package/stable/number/min-safe-integer.js +1 -0
- package/stable/number/parse-float.js +1 -0
- package/stable/number/parse-int.js +1 -0
- package/stable/number/to-fixed.js +1 -0
- package/stable/number/to-precision.js +1 -0
- package/stable/number/virtual/index.js +1 -0
- package/stable/number/virtual/to-fixed.js +1 -0
- package/stable/number/virtual/to-precision.js +1 -0
- package/stable/object/assign.js +1 -0
- package/stable/object/create.js +1 -0
- package/stable/object/define-getter.js +1 -0
- package/stable/object/define-properties.js +1 -0
- package/stable/object/define-property.js +1 -0
- package/stable/object/define-setter.js +1 -0
- package/stable/object/entries.js +1 -0
- package/stable/object/freeze.js +1 -0
- package/stable/object/from-entries.js +1 -0
- package/stable/object/get-own-property-descriptor.js +1 -0
- package/stable/object/get-own-property-descriptors.js +1 -0
- package/stable/object/get-own-property-names.js +1 -0
- package/stable/object/get-own-property-symbols.js +1 -0
- package/stable/object/get-prototype-of.js +1 -0
- package/stable/object/index.js +1 -0
- package/stable/object/is-extensible.js +1 -0
- package/stable/object/is-frozen.js +1 -0
- package/stable/object/is-sealed.js +1 -0
- package/stable/object/is.js +1 -0
- package/stable/object/keys.js +1 -0
- package/stable/object/lookup-getter.js +1 -0
- package/stable/object/lookup-setter.js +1 -0
- package/stable/object/prevent-extensions.js +1 -0
- package/stable/object/seal.js +1 -0
- package/stable/object/set-prototype-of.js +1 -0
- package/stable/object/to-string.js +1 -0
- package/stable/object/values.js +1 -0
- package/stable/parse-float.js +1 -0
- package/stable/parse-int.js +1 -0
- package/stable/promise/finally.js +1 -0
- package/stable/promise/index.js +1 -0
- package/stable/queue-microtask.js +1 -0
- package/stable/reflect/apply.js +1 -0
- package/stable/reflect/construct.js +1 -0
- package/stable/reflect/define-property.js +1 -0
- package/stable/reflect/delete-property.js +1 -0
- package/stable/reflect/get-own-property-descriptor.js +1 -0
- package/stable/reflect/get-prototype-of.js +1 -0
- package/stable/reflect/get.js +1 -0
- package/stable/reflect/has.js +1 -0
- package/stable/reflect/index.js +1 -0
- package/stable/reflect/is-extensible.js +1 -0
- package/stable/reflect/own-keys.js +1 -0
- package/stable/reflect/prevent-extensions.js +1 -0
- package/stable/reflect/set-prototype-of.js +1 -0
- package/stable/reflect/set.js +1 -0
- package/stable/regexp/constructor.js +1 -0
- package/stable/regexp/flags.js +1 -0
- package/stable/regexp/index.js +1 -0
- package/stable/regexp/match.js +1 -0
- package/stable/regexp/replace.js +1 -0
- package/stable/regexp/search.js +1 -0
- package/stable/regexp/split.js +1 -0
- package/stable/regexp/to-string.js +1 -0
- package/stable/set/index.js +1 -0
- package/stable/set-immediate.js +3 -0
- package/stable/set-interval.js +3 -0
- package/stable/set-timeout.js +3 -0
- package/stable/string/anchor.js +1 -0
- package/stable/string/big.js +1 -0
- package/stable/string/blink.js +1 -0
- package/stable/string/bold.js +1 -0
- package/stable/string/code-point-at.js +1 -0
- package/stable/string/ends-with.js +1 -0
- package/stable/string/fixed.js +1 -0
- package/stable/string/fontcolor.js +1 -0
- package/stable/string/fontsize.js +1 -0
- package/stable/string/from-code-point.js +1 -0
- package/stable/string/includes.js +1 -0
- package/stable/string/index.js +1 -0
- package/stable/string/italics.js +1 -0
- package/stable/string/iterator.js +1 -0
- package/stable/string/link.js +1 -0
- package/stable/string/match.js +1 -0
- package/stable/string/pad-end.js +1 -0
- package/stable/string/pad-start.js +1 -0
- package/stable/string/raw.js +1 -0
- package/stable/string/repeat.js +1 -0
- package/stable/string/replace.js +1 -0
- package/stable/string/search.js +1 -0
- package/stable/string/small.js +1 -0
- package/stable/string/split.js +1 -0
- package/stable/string/starts-with.js +1 -0
- package/stable/string/strike.js +1 -0
- package/stable/string/sub.js +1 -0
- package/stable/string/sup.js +1 -0
- package/stable/string/trim-end.js +1 -0
- package/stable/string/trim-left.js +1 -0
- package/stable/string/trim-right.js +1 -0
- package/stable/string/trim-start.js +1 -0
- package/stable/string/trim.js +1 -0
- package/stable/string/virtual/anchor.js +1 -0
- package/stable/string/virtual/big.js +1 -0
- package/stable/string/virtual/blink.js +1 -0
- package/stable/string/virtual/bold.js +1 -0
- package/stable/string/virtual/code-point-at.js +1 -0
- package/stable/string/virtual/ends-with.js +1 -0
- package/stable/string/virtual/fixed.js +1 -0
- package/stable/string/virtual/fontcolor.js +1 -0
- package/stable/string/virtual/fontsize.js +1 -0
- package/stable/string/virtual/includes.js +1 -0
- package/stable/string/virtual/index.js +1 -0
- package/stable/string/virtual/italics.js +1 -0
- package/stable/string/virtual/iterator.js +1 -0
- package/stable/string/virtual/link.js +1 -0
- package/stable/string/virtual/pad-end.js +1 -0
- package/stable/string/virtual/pad-start.js +1 -0
- package/stable/string/virtual/repeat.js +1 -0
- package/stable/string/virtual/small.js +1 -0
- package/stable/string/virtual/starts-with.js +1 -0
- package/stable/string/virtual/strike.js +1 -0
- package/stable/string/virtual/sub.js +1 -0
- package/stable/string/virtual/sup.js +1 -0
- package/stable/string/virtual/trim-end.js +1 -0
- package/stable/string/virtual/trim-left.js +1 -0
- package/stable/string/virtual/trim-right.js +1 -0
- package/stable/string/virtual/trim-start.js +1 -0
- package/stable/string/virtual/trim.js +1 -0
- package/stable/symbol/async-iterator.js +1 -0
- package/stable/symbol/description.js +1 -0
- package/stable/symbol/for.js +1 -0
- package/stable/symbol/has-instance.js +1 -0
- package/stable/symbol/index.js +1 -0
- package/stable/symbol/is-concat-spreadable.js +1 -0
- package/stable/symbol/iterator.js +1 -0
- package/stable/symbol/key-for.js +1 -0
- package/stable/symbol/match.js +1 -0
- package/stable/symbol/replace.js +1 -0
- package/stable/symbol/search.js +1 -0
- package/stable/symbol/species.js +1 -0
- package/stable/symbol/split.js +1 -0
- package/stable/symbol/to-primitive.js +1 -0
- package/stable/symbol/to-string-tag.js +1 -0
- package/stable/symbol/unscopables.js +1 -0
- package/stable/typed-array/copy-within.js +1 -0
- package/stable/typed-array/entries.js +1 -0
- package/stable/typed-array/every.js +1 -0
- package/stable/typed-array/fill.js +1 -0
- package/stable/typed-array/filter.js +1 -0
- package/stable/typed-array/find-index.js +1 -0
- package/stable/typed-array/find.js +1 -0
- package/stable/typed-array/float32-array.js +1 -0
- package/stable/typed-array/float64-array.js +1 -0
- package/stable/typed-array/for-each.js +1 -0
- package/stable/typed-array/from.js +1 -0
- package/stable/typed-array/includes.js +1 -0
- package/stable/typed-array/index-of.js +1 -0
- package/stable/typed-array/index.js +1 -0
- package/stable/typed-array/int16-array.js +1 -0
- package/stable/typed-array/int32-array.js +1 -0
- package/stable/typed-array/int8-array.js +1 -0
- package/stable/typed-array/iterator.js +1 -0
- package/stable/typed-array/join.js +1 -0
- package/stable/typed-array/keys.js +1 -0
- package/stable/typed-array/last-index-of.js +1 -0
- package/stable/typed-array/map.js +1 -0
- package/stable/typed-array/of.js +1 -0
- package/stable/typed-array/reduce-right.js +1 -0
- package/stable/typed-array/reduce.js +1 -0
- package/stable/typed-array/reverse.js +1 -0
- package/stable/typed-array/set.js +1 -0
- package/stable/typed-array/slice.js +1 -0
- package/stable/typed-array/some.js +1 -0
- package/stable/typed-array/sort.js +1 -0
- package/stable/typed-array/subarray.js +1 -0
- package/stable/typed-array/to-locale-string.js +1 -0
- package/stable/typed-array/to-string.js +1 -0
- package/stable/typed-array/uint16-array.js +1 -0
- package/stable/typed-array/uint32-array.js +1 -0
- package/stable/typed-array/uint8-array.js +1 -0
- package/stable/typed-array/uint8-clamped-array.js +1 -0
- package/stable/typed-array/values.js +1 -0
- package/stable/url/index.js +1 -0
- package/stable/url/to-json.js +1 -0
- package/stable/url-search-params/index.js +1 -0
- package/stable/weak-map/index.js +1 -0
- package/stable/weak-set/index.js +1 -0
- package/stage/0.js +1 -0
- package/stage/1.js +1 -2
- package/stage/2.js +1 -0
- package/stage/3.js +0 -3
- package/internals/object-statics-accept-primitives.js +0 -11
- package/internals/set-collection-from.js +0 -28
- package/internals/set-collection-of.js +0 -12
- package/internals/set-is-disjoint-or-subset.js +0 -16
- package/internals/strict-method.js +0 -9
- package/internals/string-html.js +0 -21
- package/modules/esnext.set.is-disjoint-with.js +0 -10
- package/modules/esnext.string.trim-left.js +0 -8
- package/modules/esnext.string.trim-right.js +0 -8
- package/proposals/array-flat-and-flat-map.js +0 -2
- package/proposals/object-from-entries.js +0 -2
- package/proposals/string-trim-start-end.js +0 -2
package/modules/es.array.sort.js
CHANGED
|
@@ -3,24 +3,24 @@ var aFunction = require('../internals/a-function');
|
|
|
3
3
|
var toObject = require('../internals/to-object');
|
|
4
4
|
var fails = require('../internals/fails');
|
|
5
5
|
var nativeSort = [].sort;
|
|
6
|
-
var
|
|
6
|
+
var test = [1, 2, 3];
|
|
7
7
|
|
|
8
8
|
// IE8-
|
|
9
9
|
var FAILS_ON_UNDEFINED = fails(function () {
|
|
10
|
-
|
|
10
|
+
test.sort(undefined);
|
|
11
11
|
});
|
|
12
12
|
// V8 bug
|
|
13
13
|
var FAILS_ON_NULL = fails(function () {
|
|
14
|
-
|
|
14
|
+
test.sort(null);
|
|
15
15
|
});
|
|
16
16
|
// Old WebKit
|
|
17
|
-
var SLOPPY_METHOD =
|
|
17
|
+
var SLOPPY_METHOD = require('../internals/sloppy-array-method')('sort');
|
|
18
|
+
|
|
19
|
+
var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || SLOPPY_METHOD;
|
|
18
20
|
|
|
19
21
|
// `Array.prototype.sort` method
|
|
20
22
|
// https://tc39.github.io/ecma262/#sec-array.prototype.sort
|
|
21
|
-
require('../internals/export')({
|
|
22
|
-
target: 'Array', proto: true, forced: FAILS_ON_UNDEFINED || !FAILS_ON_NULL || SLOPPY_METHOD
|
|
23
|
-
}, {
|
|
23
|
+
require('../internals/export')({ target: 'Array', proto: true, forced: FORCED }, {
|
|
24
24
|
sort: function sort(comparefn) {
|
|
25
25
|
return comparefn === undefined
|
|
26
26
|
? nativeSort.call(toObject(this))
|
|
@@ -7,10 +7,10 @@ var arraySpeciesCreate = require('../internals/array-species-create');
|
|
|
7
7
|
var createProperty = require('../internals/create-property');
|
|
8
8
|
var max = Math.max;
|
|
9
9
|
var min = Math.min;
|
|
10
|
+
var MAX_SAFE_INTEGER = 0x1fffffffffffff;
|
|
11
|
+
var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
|
|
10
12
|
|
|
11
|
-
var SPECIES_SUPPORT = require('../internals/
|
|
12
|
-
return array.splice();
|
|
13
|
-
});
|
|
13
|
+
var SPECIES_SUPPORT = require('../internals/array-method-has-species-support')('splice');
|
|
14
14
|
|
|
15
15
|
// `Array.prototype.splice` method
|
|
16
16
|
// https://tc39.github.io/ecma262/#sec-array.prototype.splice
|
|
@@ -31,7 +31,9 @@ require('../internals/export')({ target: 'Array', proto: true, forced: !SPECIES_
|
|
|
31
31
|
insertCount = argumentsLength - 2;
|
|
32
32
|
actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);
|
|
33
33
|
}
|
|
34
|
-
if (len + insertCount - actualDeleteCount >
|
|
34
|
+
if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
|
|
35
|
+
throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
|
|
36
|
+
}
|
|
35
37
|
A = arraySpeciesCreate(O, actualDeleteCount);
|
|
36
38
|
for (k = 0; k < actualDeleteCount; k++) {
|
|
37
39
|
from = actualStart + k;
|
|
@@ -54,7 +56,9 @@ require('../internals/export')({ target: 'Array', proto: true, forced: !SPECIES_
|
|
|
54
56
|
else delete O[to];
|
|
55
57
|
}
|
|
56
58
|
}
|
|
57
|
-
for (k = 0; k < insertCount; k++)
|
|
59
|
+
for (k = 0; k < insertCount; k++) {
|
|
60
|
+
O[k + actualStart] = arguments[k + 2];
|
|
61
|
+
}
|
|
58
62
|
O.length = len - actualDeleteCount + insertCount;
|
|
59
63
|
return A;
|
|
60
64
|
}
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
var toObject = require('../internals/to-object');
|
|
3
3
|
var toPrimitive = require('../internals/to-primitive');
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
// https://tc39.github.io/ecma262/#sec-date.prototype.tojson
|
|
7
|
-
require('../internals/export')({ target: 'Date', proto: true, forced: require('../internals/fails')(function () {
|
|
5
|
+
var FORCED = require('../internals/fails')(function () {
|
|
8
6
|
return new Date(NaN).toJSON() !== null
|
|
9
7
|
|| Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;
|
|
10
|
-
})
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// `Date.prototype.toJSON` method
|
|
11
|
+
// https://tc39.github.io/ecma262/#sec-date.prototype.tojson
|
|
12
|
+
require('../internals/export')({ target: 'Date', proto: true, forced: FORCED }, {
|
|
11
13
|
// eslint-disable-next-line no-unused-vars
|
|
12
14
|
toJSON: function toJSON(key) {
|
|
13
15
|
var O = toObject(this);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
var DESCRIPTORS = require('../internals/descriptors');
|
|
1
2
|
var defineProperty = require('../internals/object-define-property').f;
|
|
2
3
|
var FunctionPrototype = Function.prototype;
|
|
3
4
|
var FunctionPrototypeToString = FunctionPrototype.toString;
|
|
@@ -6,13 +7,15 @@ var NAME = 'name';
|
|
|
6
7
|
|
|
7
8
|
// Function instances `.name` property
|
|
8
9
|
// https://tc39.github.io/ecma262/#sec-function-instances-name
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
if (DESCRIPTORS && !(NAME in FunctionPrototype)) {
|
|
11
|
+
defineProperty(FunctionPrototype, NAME, {
|
|
12
|
+
configurable: true,
|
|
13
|
+
get: function () {
|
|
14
|
+
try {
|
|
15
|
+
return FunctionPrototypeToString.call(this).match(nameRE)[1];
|
|
16
|
+
} catch (e) {
|
|
17
|
+
return '';
|
|
18
|
+
}
|
|
16
19
|
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
20
|
+
});
|
|
21
|
+
}
|
package/modules/es.math.acosh.js
CHANGED
|
@@ -4,14 +4,15 @@ var log = Math.log;
|
|
|
4
4
|
var sqrt = Math.sqrt;
|
|
5
5
|
var LN2 = Math.LN2;
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
// https://tc39.github.io/ecma262/#sec-math.acosh
|
|
9
|
-
require('../internals/export')({ target: 'Math', stat: true, forced: !(nativeAcosh
|
|
7
|
+
var FORCED = !nativeAcosh
|
|
10
8
|
// V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
|
|
11
|
-
|
|
9
|
+
|| Math.floor(nativeAcosh(Number.MAX_VALUE)) != 710
|
|
12
10
|
// Tor Browser bug: Math.acosh(Infinity) -> NaN
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
|| nativeAcosh(Infinity) != Infinity;
|
|
12
|
+
|
|
13
|
+
// `Math.acosh` method
|
|
14
|
+
// https://tc39.github.io/ecma262/#sec-math.acosh
|
|
15
|
+
require('../internals/export')({ target: 'Math', stat: true, forced: FORCED }, {
|
|
15
16
|
acosh: function acosh(x) {
|
|
16
17
|
return (x = +x) < 1 ? NaN : x > 94906265.62425156
|
|
17
18
|
? log(x) + LN2
|
package/modules/es.math.asinh.js
CHANGED
|
@@ -9,6 +9,6 @@ function asinh(x) {
|
|
|
9
9
|
// `Math.asinh` method
|
|
10
10
|
// https://tc39.github.io/ecma262/#sec-math.asinh
|
|
11
11
|
// Tor Browser bug: Math.asinh(0) -> -0
|
|
12
|
-
require('../internals/export')({ target: 'Math', stat: true, forced: !(
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
require('../internals/export')({ target: 'Math', stat: true, forced: !(nativeAsinh && 1 / nativeAsinh(0) > 0) }, {
|
|
13
|
+
asinh: asinh
|
|
14
|
+
});
|
package/modules/es.math.imul.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
var nativeImul = Math.imul;
|
|
2
2
|
|
|
3
|
+
var FORCED = require('../internals/fails')(function () {
|
|
4
|
+
return nativeImul(0xffffffff, 5) != -5 || nativeImul.length != 2;
|
|
5
|
+
});
|
|
6
|
+
|
|
3
7
|
// `Math.imul` method
|
|
4
8
|
// https://tc39.github.io/ecma262/#sec-math.imul
|
|
5
9
|
// some WebKit versions fails with big numbers, some has wrong arity
|
|
6
|
-
require('../internals/export')({ target: 'Math', stat: true, forced:
|
|
7
|
-
return nativeImul(0xffffffff, 5) != -5 || nativeImul.length != 2;
|
|
8
|
-
}) }, {
|
|
10
|
+
require('../internals/export')({ target: 'Math', stat: true, forced: FORCED }, {
|
|
9
11
|
imul: function imul(x, y) {
|
|
10
12
|
var UINT16 = 0xffff;
|
|
11
13
|
var xn = +x;
|
package/modules/es.math.sinh.js
CHANGED
|
@@ -3,12 +3,14 @@ var abs = Math.abs;
|
|
|
3
3
|
var exp = Math.exp;
|
|
4
4
|
var E = Math.E;
|
|
5
5
|
|
|
6
|
+
var FORCED = require('../internals/fails')(function () {
|
|
7
|
+
return Math.sinh(-2e-17) != -2e-17;
|
|
8
|
+
});
|
|
9
|
+
|
|
6
10
|
// `Math.sinh` method
|
|
7
11
|
// https://tc39.github.io/ecma262/#sec-math.sinh
|
|
8
12
|
// V8 near Chromium 38 has a problem with very small numbers
|
|
9
|
-
require('../internals/export')({ target: 'Math', stat: true, forced:
|
|
10
|
-
return !Math.sinh(-2e-17) != -2e-17;
|
|
11
|
-
}) }, {
|
|
13
|
+
require('../internals/export')({ target: 'Math', stat: true, forced: FORCED }, {
|
|
12
14
|
sinh: function sinh(x) {
|
|
13
15
|
return abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (E / 2);
|
|
14
16
|
}
|
|
@@ -9,7 +9,7 @@ var fails = require('../internals/fails');
|
|
|
9
9
|
var getOwnPropertyNames = require('../internals/object-get-own-property-names').f;
|
|
10
10
|
var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;
|
|
11
11
|
var defineProperty = require('../internals/object-define-property').f;
|
|
12
|
-
var
|
|
12
|
+
var internalStringTrim = require('../internals/string-trim');
|
|
13
13
|
var NUMBER = 'Number';
|
|
14
14
|
var NativeNumber = global[NUMBER];
|
|
15
15
|
var NumberPrototype = NativeNumber.prototype;
|
|
@@ -22,10 +22,10 @@ var NATIVE_TRIM = 'trim' in String.prototype;
|
|
|
22
22
|
// https://tc39.github.io/ecma262/#sec-tonumber
|
|
23
23
|
var toNumber = function (argument) {
|
|
24
24
|
var it = toPrimitive(argument, false);
|
|
25
|
+
var first, third, radix, maxCode, digits, length, i, code;
|
|
25
26
|
if (typeof it == 'string' && it.length > 2) {
|
|
26
|
-
it = NATIVE_TRIM ? it.trim() :
|
|
27
|
-
|
|
28
|
-
var third, radix, maxCode;
|
|
27
|
+
it = NATIVE_TRIM ? it.trim() : internalStringTrim(it, 3);
|
|
28
|
+
first = it.charCodeAt(0);
|
|
29
29
|
if (first === 43 || first === 45) {
|
|
30
30
|
third = it.charCodeAt(2);
|
|
31
31
|
if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
|
|
@@ -35,7 +35,9 @@ var toNumber = function (argument) {
|
|
|
35
35
|
case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
|
|
36
36
|
default: return +it;
|
|
37
37
|
}
|
|
38
|
-
|
|
38
|
+
digits = it.slice(2);
|
|
39
|
+
length = digits.length;
|
|
40
|
+
for (i = 0; i < length; i++) {
|
|
39
41
|
code = digits.charCodeAt(i);
|
|
40
42
|
// parseInt parses a string to a first unavailable symbol
|
|
41
43
|
// but ToNumber should return NaN if a string contains unavailable symbols
|
|
@@ -71,7 +71,7 @@ require('../internals/export')({ target: 'Number', proto: true, forced: nativeTo
|
|
|
71
71
|
var s = '';
|
|
72
72
|
var m = '0';
|
|
73
73
|
var e, z, j, k;
|
|
74
|
-
if (f < 0 || f > 20) throw RangeError('Incorrect fraction digits
|
|
74
|
+
if (f < 0 || f > 20) throw RangeError('Incorrect fraction digits');
|
|
75
75
|
// eslint-disable-next-line no-self-compare
|
|
76
76
|
if (x != x) return 'NaN';
|
|
77
77
|
if (x <= -1e21 || x >= 1e21) return String(x);
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
var toObject = require('../internals/to-object');
|
|
3
3
|
var aFunction = require('../internals/a-function');
|
|
4
4
|
var definePropertyModule = require('../internals/object-define-property');
|
|
5
|
+
var FORCED = require('../internals/forced-object-prototype-accessors-methods');
|
|
5
6
|
|
|
6
7
|
// `Object.prototype.__defineGetter__` method
|
|
7
8
|
// https://tc39.github.io/ecma262/#sec-object.prototype.__defineGetter__
|
|
8
9
|
if (require('../internals/descriptors')) {
|
|
9
|
-
require('../internals/export')({ target: 'Object', proto: true, forced:
|
|
10
|
+
require('../internals/export')({ target: 'Object', proto: true, forced: FORCED }, {
|
|
10
11
|
__defineGetter__: function __defineGetter__(P, getter) {
|
|
11
12
|
definePropertyModule.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true });
|
|
12
13
|
}
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
var toObject = require('../internals/to-object');
|
|
3
3
|
var aFunction = require('../internals/a-function');
|
|
4
4
|
var definePropertyModule = require('../internals/object-define-property');
|
|
5
|
+
var FORCED = require('../internals/forced-object-prototype-accessors-methods');
|
|
5
6
|
|
|
6
7
|
// `Object.prototype.__defineSetter__` method
|
|
7
8
|
// https://tc39.github.io/ecma262/#sec-object.prototype.__defineSetter__
|
|
8
9
|
if (require('../internals/descriptors')) {
|
|
9
|
-
require('../internals/export')({ target: 'Object', proto: true, forced:
|
|
10
|
+
require('../internals/export')({ target: 'Object', proto: true, forced: FORCED }, {
|
|
10
11
|
__defineSetter__: function __defineSetter__(P, setter) {
|
|
11
12
|
definePropertyModule.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true });
|
|
12
13
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
1
|
+
var objectToArray = require('../internals/object-to-array');
|
|
2
2
|
|
|
3
3
|
// `Object.entries` method
|
|
4
4
|
// https://tc39.github.io/ecma262/#sec-object.entries
|
|
5
5
|
require('../internals/export')({ target: 'Object', stat: true }, {
|
|
6
6
|
entries: function entries(O) {
|
|
7
|
-
return
|
|
7
|
+
return objectToArray(O, true);
|
|
8
8
|
}
|
|
9
9
|
});
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
var isObject = require('../internals/is-object');
|
|
2
2
|
var onFreeze = require('../internals/internal-metadata').onFreeze;
|
|
3
|
+
var nativeFreeze = Object.freeze;
|
|
3
4
|
var FREEZING = require('../internals/freezing');
|
|
5
|
+
var FAILS_ON_PRIMITIVES = require('../internals/fails')(function () { nativeFreeze(1); });
|
|
4
6
|
|
|
5
7
|
// `Object.freeze` method
|
|
6
8
|
// https://tc39.github.io/ecma262/#sec-object.freeze
|
|
7
|
-
require('../internals/
|
|
8
|
-
|
|
9
|
+
require('../internals/export')({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {
|
|
10
|
+
freeze: function freeze(it) {
|
|
9
11
|
return nativeFreeze && isObject(it) ? nativeFreeze(onFreeze(it)) : it;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
File without changes
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
var DESCRIPTORS = require('../internals/descriptors');
|
|
2
1
|
var toIndexedObject = require('../internals/to-indexed-object');
|
|
3
2
|
var nativeGetOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;
|
|
3
|
+
var DESCRIPTORS = require('../internals/descriptors');
|
|
4
|
+
var FAILS_ON_PRIMITIVES = require('../internals/fails')(function () { nativeGetOwnPropertyDescriptor(1); });
|
|
5
|
+
var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;
|
|
4
6
|
|
|
5
7
|
// `Object.getOwnPropertyDescriptor` method
|
|
6
8
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
|
|
7
|
-
require('../internals/
|
|
8
|
-
|
|
9
|
+
require('../internals/export')({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
|
|
10
|
+
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
|
|
9
11
|
return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
var nativeGetOwnPropertyNames = require('../internals/object-get-own-property-names-external').f;
|
|
2
|
+
var FAILS_ON_PRIMITIVES = require('../internals/fails')(function () { Object.getOwnPropertyNames(1); });
|
|
3
|
+
|
|
1
4
|
// `Object.getOwnPropertyNames` method
|
|
2
5
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
|
|
3
|
-
require('../internals/
|
|
4
|
-
|
|
6
|
+
require('../internals/export')({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
|
|
7
|
+
getOwnPropertyNames: nativeGetOwnPropertyNames
|
|
5
8
|
});
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
var toObject = require('../internals/to-object');
|
|
2
2
|
var nativeGetPrototypeOf = require('../internals/object-get-prototype-of');
|
|
3
3
|
var CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');
|
|
4
|
+
var FAILS_ON_PRIMITIVES = require('../internals/fails')(function () { nativeGetPrototypeOf(1); });
|
|
4
5
|
|
|
5
6
|
// `Object.getPrototypeOf` method
|
|
6
7
|
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
|
|
7
|
-
require('../internals/
|
|
8
|
-
|
|
8
|
+
require('../internals/export')({
|
|
9
|
+
target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER
|
|
10
|
+
}, {
|
|
11
|
+
getPrototypeOf: function getPrototypeOf(it) {
|
|
9
12
|
return nativeGetPrototypeOf(toObject(it));
|
|
10
|
-
}
|
|
11
|
-
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
var isObject = require('../internals/is-object');
|
|
2
|
+
var nativeIsExtensible = Object.isExtensible;
|
|
3
|
+
var FAILS_ON_PRIMITIVES = require('../internals/fails')(function () { nativeIsExtensible(1); });
|
|
2
4
|
|
|
3
5
|
// `Object.isExtensible` method
|
|
4
6
|
// https://tc39.github.io/ecma262/#sec-object.isextensible
|
|
5
|
-
require('../internals/
|
|
6
|
-
|
|
7
|
+
require('../internals/export')({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
|
|
8
|
+
isExtensible: function isExtensible(it) {
|
|
7
9
|
return isObject(it) ? nativeIsExtensible ? nativeIsExtensible(it) : true : false;
|
|
8
|
-
}
|
|
10
|
+
}
|
|
9
11
|
});
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
var isObject = require('../internals/is-object');
|
|
2
|
+
var nativeIsFrozen = Object.isFrozen;
|
|
3
|
+
var FAILS_ON_PRIMITIVES = require('../internals/fails')(function () { nativeIsFrozen(1); });
|
|
2
4
|
|
|
3
5
|
// `Object.isFrozen` method
|
|
4
6
|
// https://tc39.github.io/ecma262/#sec-object.isfrozen
|
|
5
|
-
require('../internals/
|
|
6
|
-
|
|
7
|
+
require('../internals/export')({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
|
|
8
|
+
isFrozen: function isFrozen(it) {
|
|
7
9
|
return isObject(it) ? nativeIsFrozen ? nativeIsFrozen(it) : false : true;
|
|
8
|
-
}
|
|
10
|
+
}
|
|
9
11
|
});
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
var isObject = require('../internals/is-object');
|
|
2
|
+
var nativeIsSealed = Object.isSealed;
|
|
3
|
+
var FAILS_ON_PRIMITIVES = require('../internals/fails')(function () { nativeIsSealed(1); });
|
|
2
4
|
|
|
3
5
|
// `Object.isSealed` method
|
|
4
6
|
// https://tc39.github.io/ecma262/#sec-object.issealed
|
|
5
|
-
require('../internals/
|
|
6
|
-
|
|
7
|
+
require('../internals/export')({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
|
|
8
|
+
isSealed: function isSealed(it) {
|
|
7
9
|
return isObject(it) ? nativeIsSealed ? nativeIsSealed(it) : false : true;
|
|
8
|
-
}
|
|
10
|
+
}
|
|
9
11
|
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
var toObject = require('../internals/to-object');
|
|
2
2
|
var nativeKeys = require('../internals/object-keys');
|
|
3
|
+
var FAILS_ON_PRIMITIVES = require('../internals/fails')(function () { nativeKeys(1); });
|
|
3
4
|
|
|
4
5
|
// `Object.keys` method
|
|
5
6
|
// https://tc39.github.io/ecma262/#sec-object.keys
|
|
6
|
-
require('../internals/
|
|
7
|
-
|
|
7
|
+
require('../internals/export')({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
|
|
8
|
+
keys: function keys(it) {
|
|
8
9
|
return nativeKeys(toObject(it));
|
|
9
|
-
}
|
|
10
|
+
}
|
|
10
11
|
});
|
|
@@ -3,17 +3,18 @@ var toObject = require('../internals/to-object');
|
|
|
3
3
|
var toPrimitive = require('../internals/to-primitive');
|
|
4
4
|
var getPrototypeOf = require('../internals/object-get-prototype-of');
|
|
5
5
|
var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;
|
|
6
|
+
var FORCED = require('../internals/forced-object-prototype-accessors-methods');
|
|
6
7
|
|
|
7
8
|
// `Object.prototype.__lookupGetter__` method
|
|
8
9
|
// https://tc39.github.io/ecma262/#sec-object.prototype.__lookupGetter__
|
|
9
10
|
if (require('../internals/descriptors')) {
|
|
10
|
-
require('../internals/export')({ target: 'Object', proto: true, forced:
|
|
11
|
+
require('../internals/export')({ target: 'Object', proto: true, forced: FORCED }, {
|
|
11
12
|
__lookupGetter__: function __lookupGetter__(P) {
|
|
12
13
|
var O = toObject(this);
|
|
13
|
-
var
|
|
14
|
-
var
|
|
14
|
+
var key = toPrimitive(P, true);
|
|
15
|
+
var desc;
|
|
15
16
|
do {
|
|
16
|
-
if (
|
|
17
|
+
if (desc = getOwnPropertyDescriptor(O, key)) return desc.get;
|
|
17
18
|
} while (O = getPrototypeOf(O));
|
|
18
19
|
}
|
|
19
20
|
});
|
|
@@ -3,17 +3,18 @@ var toObject = require('../internals/to-object');
|
|
|
3
3
|
var toPrimitive = require('../internals/to-primitive');
|
|
4
4
|
var getPrototypeOf = require('../internals/object-get-prototype-of');
|
|
5
5
|
var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;
|
|
6
|
+
var FORCED = require('../internals/forced-object-prototype-accessors-methods');
|
|
6
7
|
|
|
7
8
|
// `Object.prototype.__lookupSetter__` method
|
|
8
9
|
// https://tc39.github.io/ecma262/#sec-object.prototype.__lookupSetter__
|
|
9
10
|
if (require('../internals/descriptors')) {
|
|
10
|
-
require('../internals/export')({ target: 'Object', proto: true, forced:
|
|
11
|
+
require('../internals/export')({ target: 'Object', proto: true, forced: FORCED }, {
|
|
11
12
|
__lookupSetter__: function __lookupSetter__(P) {
|
|
12
13
|
var O = toObject(this);
|
|
13
|
-
var
|
|
14
|
-
var
|
|
14
|
+
var key = toPrimitive(P, true);
|
|
15
|
+
var desc;
|
|
15
16
|
do {
|
|
16
|
-
if (
|
|
17
|
+
if (desc = getOwnPropertyDescriptor(O, key)) return desc.set;
|
|
17
18
|
} while (O = getPrototypeOf(O));
|
|
18
19
|
}
|
|
19
20
|
});
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
var isObject = require('../internals/is-object');
|
|
2
2
|
var onFreeze = require('../internals/internal-metadata').onFreeze;
|
|
3
|
+
var nativePreventExtensions = Object.preventExtensions;
|
|
3
4
|
var FREEZING = require('../internals/freezing');
|
|
5
|
+
var FAILS_ON_PRIMITIVES = require('../internals/fails')(function () { nativePreventExtensions(1); });
|
|
4
6
|
|
|
5
7
|
// `Object.preventExtensions` method
|
|
6
8
|
// https://tc39.github.io/ecma262/#sec-object.preventextensions
|
|
7
|
-
require('../internals/
|
|
8
|
-
|
|
9
|
+
require('../internals/export')({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {
|
|
10
|
+
preventExtensions: function preventExtensions(it) {
|
|
9
11
|
return nativePreventExtensions && isObject(it) ? nativePreventExtensions(onFreeze(it)) : it;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
var isObject = require('../internals/is-object');
|
|
2
2
|
var onFreeze = require('../internals/internal-metadata').onFreeze;
|
|
3
|
+
var nativeSeal = Object.seal;
|
|
3
4
|
var FREEZING = require('../internals/freezing');
|
|
5
|
+
var FAILS_ON_PRIMITIVES = require('../internals/fails')(function () { nativeSeal(1); });
|
|
4
6
|
|
|
5
7
|
// `Object.seal` method
|
|
6
8
|
// https://tc39.github.io/ecma262/#sec-object.seal
|
|
7
|
-
require('../internals/
|
|
8
|
-
|
|
9
|
+
require('../internals/export')({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {
|
|
10
|
+
seal: function seal(it) {
|
|
9
11
|
return nativeSeal && isObject(it) ? nativeSeal(onFreeze(it)) : it;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
var toString = require('../internals/object-to-string');
|
|
2
|
+
var ObjectPrototype = Object.prototype;
|
|
2
3
|
|
|
3
4
|
// `Object.prototype.toString` method
|
|
4
5
|
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
|
|
5
|
-
if (toString !==
|
|
6
|
-
require('../internals/redefine')(
|
|
6
|
+
if (toString !== ObjectPrototype.toString) {
|
|
7
|
+
require('../internals/redefine')(ObjectPrototype, 'toString', toString, { unsafe: true });
|
|
7
8
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
1
|
+
var objectToArray = require('../internals/object-to-array');
|
|
2
2
|
|
|
3
3
|
// `Object.values` method
|
|
4
4
|
// https://tc39.github.io/ecma262/#sec-object.values
|
|
5
5
|
require('../internals/export')({ target: 'Object', stat: true }, {
|
|
6
6
|
values: function values(O) {
|
|
7
|
-
return
|
|
7
|
+
return objectToArray(O);
|
|
8
8
|
}
|
|
9
9
|
});
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
var
|
|
3
|
-
var global = require('../internals/global');
|
|
2
|
+
var getBuiltIn = require('../internals/get-built-in');
|
|
4
3
|
var speciesConstructor = require('../internals/species-constructor');
|
|
5
4
|
var promiseResolve = require('../internals/promise-resolve');
|
|
6
5
|
|
|
7
6
|
// `Promise.prototype.finally` method
|
|
8
7
|
// https://tc39.github.io/ecma262/#sec-promise.prototype.finally
|
|
9
|
-
require('../internals/export')({ target: 'Promise', proto: true, real: true }, {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
require('../internals/export')({ target: 'Promise', proto: true, real: true }, {
|
|
9
|
+
'finally': function (onFinally) {
|
|
10
|
+
var C = speciesConstructor(this, getBuiltIn('Promise'));
|
|
11
|
+
var isFunction = typeof onFinally == 'function';
|
|
12
|
+
return this.then(
|
|
13
|
+
isFunction ? function (x) {
|
|
14
|
+
return promiseResolve(C, onFinally()).then(function () { return x; });
|
|
15
|
+
} : onFinally,
|
|
16
|
+
isFunction ? function (e) {
|
|
17
|
+
return promiseResolve(C, onFinally()).then(function () { throw e; });
|
|
18
|
+
} : onFinally
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
});
|
package/modules/es.promise.js
CHANGED
|
@@ -27,6 +27,7 @@ var PromiseConstructor = global[PROMISE];
|
|
|
27
27
|
var TypeError = global.TypeError;
|
|
28
28
|
var document = global.document;
|
|
29
29
|
var process = global.process;
|
|
30
|
+
var $fetch = global.fetch;
|
|
30
31
|
var versions = process && process.versions;
|
|
31
32
|
var v8 = versions && versions.v8 || '';
|
|
32
33
|
var newPromiseCapability = newPromiseCapabilityModule.f;
|
|
@@ -60,6 +61,10 @@ var FORCED = isForced(PROMISE, function () {
|
|
|
60
61
|
&& userAgent.indexOf('Chrome/66') === -1);
|
|
61
62
|
});
|
|
62
63
|
|
|
64
|
+
var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
|
|
65
|
+
PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
|
|
66
|
+
});
|
|
67
|
+
|
|
63
68
|
// helpers
|
|
64
69
|
var isThenable = function (it) {
|
|
65
70
|
var then;
|
|
@@ -176,7 +181,7 @@ var internalResolve = function (promise, state, value, unwrap) {
|
|
|
176
181
|
state.done = true;
|
|
177
182
|
if (unwrap) state = unwrap;
|
|
178
183
|
try {
|
|
179
|
-
if (promise === value) throw TypeError("Promise can't be resolved itself
|
|
184
|
+
if (promise === value) throw TypeError("Promise can't be resolved itself");
|
|
180
185
|
var then = isThenable(value);
|
|
181
186
|
if (then) {
|
|
182
187
|
microtask(function () {
|
|
@@ -259,6 +264,14 @@ if (FORCED) {
|
|
|
259
264
|
? new OwnPromiseCapability(C)
|
|
260
265
|
: newGenericPromiseCapability(C);
|
|
261
266
|
};
|
|
267
|
+
|
|
268
|
+
// wrap fetch result
|
|
269
|
+
if (!IS_PURE && typeof $fetch == 'function') $export({ global: true, enumerable: true, forced: true }, {
|
|
270
|
+
// eslint-disable-next-line no-unused-vars
|
|
271
|
+
fetch: function fetch(input) {
|
|
272
|
+
return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments));
|
|
273
|
+
}
|
|
274
|
+
});
|
|
262
275
|
}
|
|
263
276
|
|
|
264
277
|
$export({ global: true, wrap: true, forced: FORCED }, { Promise: PromiseConstructor });
|
|
@@ -287,9 +300,7 @@ $export({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {
|
|
|
287
300
|
}
|
|
288
301
|
});
|
|
289
302
|
|
|
290
|
-
$export({ target: PROMISE, stat: true, forced:
|
|
291
|
-
PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
|
|
292
|
-
}) }, {
|
|
303
|
+
$export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
|
|
293
304
|
// `Promise.all` method
|
|
294
305
|
// https://tc39.github.io/ecma262/#sec-promise.all
|
|
295
306
|
all: function all(iterable) {
|