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
|
@@ -12,8 +12,10 @@ var OPTIONAL_ARGUMENTS_LIST = !require('../internals/fails')(function () {
|
|
|
12
12
|
// https://tc39.github.io/ecma262/#sec-reflect.apply
|
|
13
13
|
require('../internals/export')({ target: 'Reflect', stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, {
|
|
14
14
|
apply: function apply(target, thisArgument, argumentsList) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return nativeApply
|
|
15
|
+
aFunction(target);
|
|
16
|
+
anObject(argumentsList);
|
|
17
|
+
return nativeApply
|
|
18
|
+
? nativeApply(target, thisArgument, argumentsList)
|
|
19
|
+
: functionApply.call(target, thisArgument, argumentsList);
|
|
18
20
|
}
|
|
19
21
|
});
|
|
@@ -12,9 +12,9 @@ function get(target, propertyKey /* , receiver */) {
|
|
|
12
12
|
if (anObject(target) === receiver) return target[propertyKey];
|
|
13
13
|
if (descriptor = getOwnPropertyDescriptorModule.f(target, propertyKey)) return has(descriptor, 'value')
|
|
14
14
|
? descriptor.value
|
|
15
|
-
: descriptor.get
|
|
16
|
-
?
|
|
17
|
-
:
|
|
15
|
+
: descriptor.get === undefined
|
|
16
|
+
? undefined
|
|
17
|
+
: descriptor.get.call(receiver);
|
|
18
18
|
if (isObject(prototype = getPrototypeOf(target))) return get(prototype, propertyKey, receiver);
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
1
|
+
var getBuiltIn = require('../internals/get-built-in');
|
|
2
2
|
var anObject = require('../internals/an-object');
|
|
3
|
-
var
|
|
3
|
+
var FREEZING = require('../internals/freezing');
|
|
4
4
|
|
|
5
5
|
// `Reflect.preventExtensions` method
|
|
6
6
|
// https://tc39.github.io/ecma262/#sec-reflect.preventextensions
|
|
@@ -8,6 +8,7 @@ require('../internals/export')({ target: 'Reflect', stat: true, sham: !FREEZING
|
|
|
8
8
|
preventExtensions: function preventExtensions(target) {
|
|
9
9
|
anObject(target);
|
|
10
10
|
try {
|
|
11
|
+
var objectPreventExtensions = getBuiltIn('Object', 'preventExtensions');
|
|
11
12
|
if (objectPreventExtensions) objectPreventExtensions(target);
|
|
12
13
|
return true;
|
|
13
14
|
} catch (e) {
|
|
@@ -17,13 +17,15 @@ var re2 = /a/g;
|
|
|
17
17
|
// "new" should create a new object, old webkit bug
|
|
18
18
|
var CORRECT_NEW = new NativeRegExp(re1) !== re1;
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
// https://tc39.github.io/ecma262/#sec-regexp-constructor
|
|
22
|
-
if (isForced('RegExp', DESCRIPTORS && (!CORRECT_NEW || fails(function () {
|
|
20
|
+
var FORCED = isForced('RegExp', DESCRIPTORS && (!CORRECT_NEW || fails(function () {
|
|
23
21
|
re2[MATCH] = false;
|
|
24
22
|
// RegExp constructor can alter flags and IsRegExp works correct with @@match
|
|
25
23
|
return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';
|
|
26
|
-
})))
|
|
24
|
+
})));
|
|
25
|
+
|
|
26
|
+
// `RegExp` constructor
|
|
27
|
+
// https://tc39.github.io/ecma262/#sec-regexp-constructor
|
|
28
|
+
if (FORCED) {
|
|
27
29
|
var RegExpWrapper = function RegExp(pattern, flags) {
|
|
28
30
|
var thisIsRegExp = this instanceof RegExpWrapper;
|
|
29
31
|
var patternIsRegExp = isRegExp(pattern);
|
|
@@ -43,7 +45,9 @@ if (isForced('RegExp', DESCRIPTORS && (!CORRECT_NEW || fails(function () {
|
|
|
43
45
|
set: function (it) { NativeRegExp[key] = it; }
|
|
44
46
|
});
|
|
45
47
|
};
|
|
46
|
-
|
|
48
|
+
var keys = getOwnPropertyNames(NativeRegExp);
|
|
49
|
+
var i = 0;
|
|
50
|
+
while (i < keys.length) proxy(keys[i++]);
|
|
47
51
|
RegExpPrototype.constructor = RegExpWrapper;
|
|
48
52
|
RegExpWrapper.prototype = RegExpPrototype;
|
|
49
53
|
redefine(global, 'RegExp', RegExpWrapper);
|
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var regexpExec = require('../internals/regexp-exec');
|
|
4
4
|
|
|
5
|
-
require('../internals/export')({
|
|
6
|
-
target: 'RegExp',
|
|
7
|
-
proto: true,
|
|
8
|
-
forced: regexpExec !== /./.exec
|
|
9
|
-
}, {
|
|
5
|
+
require('../internals/export')({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
|
|
10
6
|
exec: regexpExec
|
|
11
7
|
});
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var createHTML = require('../internals/create-html');
|
|
3
|
+
var FORCED = require('../internals/forced-string-html-method')('anchor');
|
|
4
|
+
|
|
2
5
|
// `String.prototype.anchor` method
|
|
3
6
|
// https://tc39.github.io/ecma262/#sec-string.prototype.anchor
|
|
4
|
-
require('../internals/
|
|
5
|
-
|
|
7
|
+
require('../internals/export')({ target: 'String', proto: true, forced: FORCED }, {
|
|
8
|
+
anchor: function anchor(name) {
|
|
6
9
|
return createHTML(this, 'a', 'name', name);
|
|
7
|
-
}
|
|
10
|
+
}
|
|
8
11
|
});
|
package/modules/es.string.big.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var createHTML = require('../internals/create-html');
|
|
3
|
+
var FORCED = require('../internals/forced-string-html-method')('big');
|
|
4
|
+
|
|
2
5
|
// `String.prototype.big` method
|
|
3
6
|
// https://tc39.github.io/ecma262/#sec-string.prototype.big
|
|
4
|
-
require('../internals/
|
|
5
|
-
|
|
7
|
+
require('../internals/export')({ target: 'String', proto: true, forced: FORCED }, {
|
|
8
|
+
big: function big() {
|
|
6
9
|
return createHTML(this, 'big', '', '');
|
|
7
|
-
}
|
|
10
|
+
}
|
|
8
11
|
});
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var createHTML = require('../internals/create-html');
|
|
3
|
+
var FORCED = require('../internals/forced-string-html-method')('blink');
|
|
4
|
+
|
|
2
5
|
// `String.prototype.blink` method
|
|
3
6
|
// https://tc39.github.io/ecma262/#sec-string.prototype.blink
|
|
4
|
-
require('../internals/
|
|
5
|
-
|
|
7
|
+
require('../internals/export')({ target: 'String', proto: true, forced: FORCED }, {
|
|
8
|
+
blink: function blink() {
|
|
6
9
|
return createHTML(this, 'blink', '', '');
|
|
7
|
-
}
|
|
10
|
+
}
|
|
8
11
|
});
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var createHTML = require('../internals/create-html');
|
|
3
|
+
var FORCED = require('../internals/forced-string-html-method')('bold');
|
|
4
|
+
|
|
2
5
|
// `String.prototype.bold` method
|
|
3
6
|
// https://tc39.github.io/ecma262/#sec-string.prototype.bold
|
|
4
|
-
require('../internals/
|
|
5
|
-
|
|
7
|
+
require('../internals/export')({ target: 'String', proto: true, forced: FORCED }, {
|
|
8
|
+
bold: function bold() {
|
|
6
9
|
return createHTML(this, 'b', '', '');
|
|
7
|
-
}
|
|
10
|
+
}
|
|
8
11
|
});
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var createHTML = require('../internals/create-html');
|
|
3
|
+
var FORCED = require('../internals/forced-string-html-method')('fixed');
|
|
4
|
+
|
|
2
5
|
// `String.prototype.fixed` method
|
|
3
6
|
// https://tc39.github.io/ecma262/#sec-string.prototype.fixed
|
|
4
|
-
require('../internals/
|
|
5
|
-
|
|
7
|
+
require('../internals/export')({ target: 'String', proto: true, forced: FORCED }, {
|
|
8
|
+
fixed: function fixed() {
|
|
6
9
|
return createHTML(this, 'tt', '', '');
|
|
7
|
-
}
|
|
10
|
+
}
|
|
8
11
|
});
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var createHTML = require('../internals/create-html');
|
|
3
|
+
var FORCED = require('../internals/forced-string-html-method')('fontcolor');
|
|
4
|
+
|
|
2
5
|
// `String.prototype.fontcolor` method
|
|
3
6
|
// https://tc39.github.io/ecma262/#sec-string.prototype.fontcolor
|
|
4
|
-
require('../internals/
|
|
5
|
-
|
|
7
|
+
require('../internals/export')({ target: 'String', proto: true, forced: FORCED }, {
|
|
8
|
+
fontcolor: function fontcolor(color) {
|
|
6
9
|
return createHTML(this, 'font', 'color', color);
|
|
7
|
-
}
|
|
10
|
+
}
|
|
8
11
|
});
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var createHTML = require('../internals/create-html');
|
|
3
|
+
var FORCED = require('../internals/forced-string-html-method')('fontsize');
|
|
4
|
+
|
|
2
5
|
// `String.prototype.fontsize` method
|
|
3
6
|
// https://tc39.github.io/ecma262/#sec-string.prototype.fontsize
|
|
4
|
-
require('../internals/
|
|
5
|
-
|
|
7
|
+
require('../internals/export')({ target: 'String', proto: true, forced: FORCED }, {
|
|
8
|
+
fontsize: function fontsize(size) {
|
|
6
9
|
return createHTML(this, 'font', 'size', size);
|
|
7
|
-
}
|
|
10
|
+
}
|
|
8
11
|
});
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var createHTML = require('../internals/create-html');
|
|
3
|
+
var FORCED = require('../internals/forced-string-html-method')('italics');
|
|
4
|
+
|
|
2
5
|
// `String.prototype.italics` method
|
|
3
6
|
// https://tc39.github.io/ecma262/#sec-string.prototype.italics
|
|
4
|
-
require('../internals/
|
|
5
|
-
|
|
7
|
+
require('../internals/export')({ target: 'String', proto: true, forced: FORCED }, {
|
|
8
|
+
italics: function italics() {
|
|
6
9
|
return createHTML(this, 'i', '', '');
|
|
7
|
-
}
|
|
10
|
+
}
|
|
8
11
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
var
|
|
2
|
+
var codePointAt = require('../internals/string-at');
|
|
3
3
|
var InternalStateModule = require('../internals/internal-state');
|
|
4
4
|
var defineIterator = require('../internals/define-iterator');
|
|
5
5
|
var STRING_ITERATOR = 'String Iterator';
|
|
@@ -22,7 +22,7 @@ defineIterator(String, 'String', function (iterated) {
|
|
|
22
22
|
var index = state.index;
|
|
23
23
|
var point;
|
|
24
24
|
if (index >= string.length) return { value: undefined, done: true };
|
|
25
|
-
point =
|
|
25
|
+
point = codePointAt(string, index, true);
|
|
26
26
|
state.index += point.length;
|
|
27
27
|
return { value: point, done: false };
|
|
28
28
|
});
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var createHTML = require('../internals/create-html');
|
|
3
|
+
var FORCED = require('../internals/forced-string-html-method')('link');
|
|
4
|
+
|
|
2
5
|
// `String.prototype.link` method
|
|
3
6
|
// https://tc39.github.io/ecma262/#sec-string.prototype.link
|
|
4
|
-
require('../internals/
|
|
5
|
-
|
|
7
|
+
require('../internals/export')({ target: 'String', proto: true, forced: FORCED }, {
|
|
8
|
+
link: function link(url) {
|
|
6
9
|
return createHTML(this, 'a', 'href', url);
|
|
7
|
-
}
|
|
10
|
+
}
|
|
8
11
|
});
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var anObject = require('../internals/an-object');
|
|
4
4
|
var toLength = require('../internals/to-length');
|
|
5
|
+
var requireObjectCoercible = require('../internals/require-object-coercible');
|
|
5
6
|
var advanceStringIndex = require('../internals/advance-string-index');
|
|
6
7
|
var regExpExec = require('../internals/regexp-exec-abstract');
|
|
7
8
|
|
|
@@ -9,12 +10,12 @@ var regExpExec = require('../internals/regexp-exec-abstract');
|
|
|
9
10
|
require('../internals/fix-regexp-well-known-symbol-logic')(
|
|
10
11
|
'match',
|
|
11
12
|
1,
|
|
12
|
-
function (
|
|
13
|
+
function (MATCH, nativeMatch, maybeCallNative) {
|
|
13
14
|
return [
|
|
14
15
|
// `String.prototype.match` method
|
|
15
16
|
// https://tc39.github.io/ecma262/#sec-string.prototype.match
|
|
16
17
|
function match(regexp) {
|
|
17
|
-
var O =
|
|
18
|
+
var O = requireObjectCoercible(this);
|
|
18
19
|
var matcher = regexp == undefined ? undefined : regexp[MATCH];
|
|
19
20
|
return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
|
|
20
21
|
},
|
|
@@ -4,6 +4,7 @@ var anObject = require('../internals/an-object');
|
|
|
4
4
|
var toObject = require('../internals/to-object');
|
|
5
5
|
var toLength = require('../internals/to-length');
|
|
6
6
|
var toInteger = require('../internals/to-integer');
|
|
7
|
+
var requireObjectCoercible = require('../internals/require-object-coercible');
|
|
7
8
|
var advanceStringIndex = require('../internals/advance-string-index');
|
|
8
9
|
var regExpExec = require('../internals/regexp-exec-abstract');
|
|
9
10
|
var max = Math.max;
|
|
@@ -20,12 +21,12 @@ var maybeToString = function (it) {
|
|
|
20
21
|
require('../internals/fix-regexp-well-known-symbol-logic')(
|
|
21
22
|
'replace',
|
|
22
23
|
2,
|
|
23
|
-
function (
|
|
24
|
+
function (REPLACE, nativeReplace, maybeCallNative) {
|
|
24
25
|
return [
|
|
25
26
|
// `String.prototype.replace` method
|
|
26
27
|
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
|
|
27
28
|
function replace(searchValue, replaceValue) {
|
|
28
|
-
var O =
|
|
29
|
+
var O = requireObjectCoercible(this);
|
|
29
30
|
var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
|
|
30
31
|
return replacer !== undefined
|
|
31
32
|
? replacer.call(searchValue, O, replaceValue)
|
|
@@ -112,12 +113,12 @@ require('../internals/fix-regexp-well-known-symbol-logic')(
|
|
|
112
113
|
break;
|
|
113
114
|
default: // \d\d?
|
|
114
115
|
var n = +ch;
|
|
115
|
-
if (n === 0) return
|
|
116
|
+
if (n === 0) return match;
|
|
116
117
|
if (n > m) {
|
|
117
118
|
var f = floor(n / 10);
|
|
118
|
-
if (f === 0) return
|
|
119
|
+
if (f === 0) return match;
|
|
119
120
|
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
|
|
120
|
-
return
|
|
121
|
+
return match;
|
|
121
122
|
}
|
|
122
123
|
capture = captures[n - 1];
|
|
123
124
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var anObject = require('../internals/an-object');
|
|
4
|
+
var requireObjectCoercible = require('../internals/require-object-coercible');
|
|
4
5
|
var sameValue = require('../internals/same-value');
|
|
5
6
|
var regExpExec = require('../internals/regexp-exec-abstract');
|
|
6
7
|
|
|
@@ -8,12 +9,12 @@ var regExpExec = require('../internals/regexp-exec-abstract');
|
|
|
8
9
|
require('../internals/fix-regexp-well-known-symbol-logic')(
|
|
9
10
|
'search',
|
|
10
11
|
1,
|
|
11
|
-
function (
|
|
12
|
+
function (SEARCH, nativeSearch, maybeCallNative) {
|
|
12
13
|
return [
|
|
13
14
|
// `String.prototype.search` method
|
|
14
15
|
// https://tc39.github.io/ecma262/#sec-string.prototype.search
|
|
15
16
|
function search(regexp) {
|
|
16
|
-
var O =
|
|
17
|
+
var O = requireObjectCoercible(this);
|
|
17
18
|
var searcher = regexp == undefined ? undefined : regexp[SEARCH];
|
|
18
19
|
return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
|
|
19
20
|
},
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var createHTML = require('../internals/create-html');
|
|
3
|
+
var FORCED = require('../internals/forced-string-html-method')('small');
|
|
4
|
+
|
|
2
5
|
// `String.prototype.small` method
|
|
3
6
|
// https://tc39.github.io/ecma262/#sec-string.prototype.small
|
|
4
|
-
require('../internals/
|
|
5
|
-
|
|
7
|
+
require('../internals/export')({ target: 'String', proto: true, forced: FORCED }, {
|
|
8
|
+
small: function small() {
|
|
6
9
|
return createHTML(this, 'small', '', '');
|
|
7
|
-
}
|
|
10
|
+
}
|
|
8
11
|
});
|
|
@@ -2,39 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
var isRegExp = require('../internals/is-regexp');
|
|
4
4
|
var anObject = require('../internals/an-object');
|
|
5
|
+
var requireObjectCoercible = require('../internals/require-object-coercible');
|
|
5
6
|
var speciesConstructor = require('../internals/species-constructor');
|
|
6
7
|
var advanceStringIndex = require('../internals/advance-string-index');
|
|
7
8
|
var toLength = require('../internals/to-length');
|
|
8
9
|
var callRegExpExec = require('../internals/regexp-exec-abstract');
|
|
9
10
|
var regexpExec = require('../internals/regexp-exec');
|
|
11
|
+
var fails = require('../internals/fails');
|
|
10
12
|
var arrayPush = [].push;
|
|
11
13
|
var min = Math.min;
|
|
12
|
-
var
|
|
14
|
+
var MAX_UINT32 = 0xffffffff;
|
|
13
15
|
|
|
14
|
-
//
|
|
15
|
-
var SUPPORTS_Y =
|
|
16
|
+
// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
|
|
17
|
+
var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });
|
|
16
18
|
|
|
17
19
|
// @@split logic
|
|
18
20
|
require('../internals/fix-regexp-well-known-symbol-logic')(
|
|
19
21
|
'split',
|
|
20
22
|
2,
|
|
21
|
-
function (
|
|
23
|
+
function (SPLIT, nativeSplit, maybeCallNative) {
|
|
22
24
|
var internalSplit;
|
|
23
25
|
if (
|
|
24
26
|
'abbc'.split(/(b)*/)[1] == 'c' ||
|
|
25
|
-
'test'.split(/(?:)/, -1)
|
|
26
|
-
'ab'.split(/(?:ab)*/)
|
|
27
|
-
'.'.split(/(.?)(.?)/)
|
|
28
|
-
'.'.split(/()()/)
|
|
29
|
-
''.split(/.?/)
|
|
27
|
+
'test'.split(/(?:)/, -1).length != 4 ||
|
|
28
|
+
'ab'.split(/(?:ab)*/).length != 2 ||
|
|
29
|
+
'.'.split(/(.?)(.?)/).length != 4 ||
|
|
30
|
+
'.'.split(/()()/).length > 1 ||
|
|
31
|
+
''.split(/.?/).length
|
|
30
32
|
) {
|
|
31
33
|
// based on es5-shim implementation, need to rework it
|
|
32
34
|
internalSplit = function (separator, limit) {
|
|
33
|
-
var string = String(this);
|
|
34
|
-
|
|
35
|
+
var string = String(requireObjectCoercible(this));
|
|
36
|
+
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
|
37
|
+
if (lim === 0) return [];
|
|
38
|
+
if (separator === undefined) return [string];
|
|
35
39
|
// If `separator` is not a regex, use native split
|
|
36
40
|
if (!isRegExp(separator)) {
|
|
37
|
-
return nativeSplit.call(string, separator,
|
|
41
|
+
return nativeSplit.call(string, separator, lim);
|
|
38
42
|
}
|
|
39
43
|
var output = [];
|
|
40
44
|
var flags = (separator.ignoreCase ? 'i' : '') +
|
|
@@ -42,7 +46,6 @@ require('../internals/fix-regexp-well-known-symbol-logic')(
|
|
|
42
46
|
(separator.unicode ? 'u' : '') +
|
|
43
47
|
(separator.sticky ? 'y' : '');
|
|
44
48
|
var lastLastIndex = 0;
|
|
45
|
-
var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;
|
|
46
49
|
// Make `global` and avoid `lastIndex` issues by working with a copy
|
|
47
50
|
var separatorCopy = new RegExp(separator.source, flags + 'g');
|
|
48
51
|
var match, lastIndex, lastLength;
|
|
@@ -50,20 +53,20 @@ require('../internals/fix-regexp-well-known-symbol-logic')(
|
|
|
50
53
|
lastIndex = separatorCopy.lastIndex;
|
|
51
54
|
if (lastIndex > lastLastIndex) {
|
|
52
55
|
output.push(string.slice(lastLastIndex, match.index));
|
|
53
|
-
if (match
|
|
54
|
-
lastLength = match[0]
|
|
56
|
+
if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
|
|
57
|
+
lastLength = match[0].length;
|
|
55
58
|
lastLastIndex = lastIndex;
|
|
56
|
-
if (output
|
|
59
|
+
if (output.length >= lim) break;
|
|
57
60
|
}
|
|
58
61
|
if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
|
|
59
62
|
}
|
|
60
|
-
if (lastLastIndex === string
|
|
63
|
+
if (lastLastIndex === string.length) {
|
|
61
64
|
if (lastLength || !separatorCopy.test('')) output.push('');
|
|
62
65
|
} else output.push(string.slice(lastLastIndex));
|
|
63
|
-
return output
|
|
66
|
+
return output.length > lim ? output.slice(0, lim) : output;
|
|
64
67
|
};
|
|
65
68
|
// Chakra, V8
|
|
66
|
-
} else if ('0'.split(undefined, 0)
|
|
69
|
+
} else if ('0'.split(undefined, 0).length) {
|
|
67
70
|
internalSplit = function (separator, limit) {
|
|
68
71
|
return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
|
|
69
72
|
};
|
|
@@ -73,7 +76,7 @@ require('../internals/fix-regexp-well-known-symbol-logic')(
|
|
|
73
76
|
// `String.prototype.split` method
|
|
74
77
|
// https://tc39.github.io/ecma262/#sec-string.prototype.split
|
|
75
78
|
function split(separator, limit) {
|
|
76
|
-
var O =
|
|
79
|
+
var O = requireObjectCoercible(this);
|
|
77
80
|
var splitter = separator == undefined ? undefined : separator[SPLIT];
|
|
78
81
|
return splitter !== undefined
|
|
79
82
|
? splitter.call(separator, O, limit)
|
|
@@ -94,14 +97,14 @@ require('../internals/fix-regexp-well-known-symbol-logic')(
|
|
|
94
97
|
|
|
95
98
|
var unicodeMatching = rx.unicode;
|
|
96
99
|
var flags = (rx.ignoreCase ? 'i' : '') +
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
(rx.multiline ? 'm' : '') +
|
|
101
|
+
(rx.unicode ? 'u' : '') +
|
|
102
|
+
(SUPPORTS_Y ? 'y' : 'g');
|
|
100
103
|
|
|
101
104
|
// ^(? + rx + ) is needed, in combination with some S slicing, to
|
|
102
105
|
// simulate the 'y' flag.
|
|
103
106
|
var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
|
|
104
|
-
var lim = limit === undefined ?
|
|
107
|
+
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
|
105
108
|
if (lim === 0) return [];
|
|
106
109
|
if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
|
|
107
110
|
var p = 0;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var createHTML = require('../internals/create-html');
|
|
3
|
+
var FORCED = require('../internals/forced-string-html-method')('strike');
|
|
4
|
+
|
|
2
5
|
// `String.prototype.strike` method
|
|
3
6
|
// https://tc39.github.io/ecma262/#sec-string.prototype.strike
|
|
4
|
-
require('../internals/
|
|
5
|
-
|
|
7
|
+
require('../internals/export')({ target: 'String', proto: true, forced: FORCED }, {
|
|
8
|
+
strike: function strike() {
|
|
6
9
|
return createHTML(this, 'strike', '', '');
|
|
7
|
-
}
|
|
10
|
+
}
|
|
8
11
|
});
|
package/modules/es.string.sub.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var createHTML = require('../internals/create-html');
|
|
3
|
+
var FORCED = require('../internals/forced-string-html-method')('sub');
|
|
4
|
+
|
|
2
5
|
// `String.prototype.sub` method
|
|
3
6
|
// https://tc39.github.io/ecma262/#sec-string.prototype.sub
|
|
4
|
-
require('../internals/
|
|
5
|
-
|
|
7
|
+
require('../internals/export')({ target: 'String', proto: true, forced: FORCED }, {
|
|
8
|
+
sub: function sub() {
|
|
6
9
|
return createHTML(this, 'sub', '', '');
|
|
7
|
-
}
|
|
10
|
+
}
|
|
8
11
|
});
|
package/modules/es.string.sup.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var createHTML = require('../internals/create-html');
|
|
3
|
+
var FORCED = require('../internals/forced-string-html-method')('sup');
|
|
4
|
+
|
|
2
5
|
// `String.prototype.sup` method
|
|
3
6
|
// https://tc39.github.io/ecma262/#sec-string.prototype.sup
|
|
4
|
-
require('../internals/
|
|
5
|
-
|
|
7
|
+
require('../internals/export')({ target: 'String', proto: true, forced: FORCED }, {
|
|
8
|
+
sup: function sup() {
|
|
6
9
|
return createHTML(this, 'sup', '', '');
|
|
7
|
-
}
|
|
10
|
+
}
|
|
8
11
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var internalStringTrim = require('../internals/string-trim');
|
|
3
|
+
var FORCED = require('../internals/forced-string-trim-method')('trimEnd');
|
|
4
|
+
|
|
5
|
+
var trimEnd = FORCED ? function trimEnd() {
|
|
6
|
+
return internalStringTrim(this, 2);
|
|
7
|
+
} : ''.trimEnd;
|
|
8
|
+
|
|
9
|
+
// `String.prototype.{ trimEnd, trimRight }` methods
|
|
10
|
+
// https://github.com/tc39/ecmascript-string-left-right-trim
|
|
11
|
+
require('../internals/export')({ target: 'String', proto: true, forced: FORCED }, {
|
|
12
|
+
trimEnd: trimEnd,
|
|
13
|
+
trimRight: trimEnd
|
|
14
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
var internalStringTrim = require('../internals/string-trim');
|
|
3
|
+
var FORCED = require('../internals/forced-string-trim-method')('trimStart');
|
|
4
|
+
|
|
5
|
+
var trimStart = FORCED ? function trimStart() {
|
|
6
|
+
return internalStringTrim(this, 1);
|
|
7
|
+
} : ''.trimStart;
|
|
8
|
+
|
|
9
|
+
// `String.prototype.{ trimStart, trimLeft }` methods
|
|
10
|
+
// https://github.com/tc39/ecmascript-string-left-right-trim
|
|
11
|
+
require('../internals/export')({ target: 'String', proto: true, forced: FORCED }, {
|
|
12
|
+
trimStart: trimStart,
|
|
13
|
+
trimLeft: trimStart
|
|
14
|
+
});
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
+
var internalStringTrim = require('../internals/string-trim');
|
|
3
|
+
var FORCED = require('../internals/forced-string-trim-method')('trim');
|
|
4
|
+
|
|
2
5
|
// `String.prototype.trim` method
|
|
3
6
|
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
|
4
|
-
require('../internals/
|
|
5
|
-
|
|
6
|
-
return
|
|
7
|
-
}
|
|
7
|
+
require('../internals/export')({ target: 'String', proto: true, forced: FORCED }, {
|
|
8
|
+
trim: function trim() {
|
|
9
|
+
return internalStringTrim(this, 3);
|
|
10
|
+
}
|
|
8
11
|
});
|