core-js-pure 3.7.0 → 3.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +3 -2
  3. package/es/array/virtual/filter-out.js +4 -0
  4. package/es/instance/replace-all.js +9 -0
  5. package/es/promise/all-settled.js +2 -0
  6. package/es/promise/any.js +2 -0
  7. package/features/array/at.js +4 -0
  8. package/features/array/filter-out.js +4 -0
  9. package/features/array/index.js +4 -0
  10. package/features/array/unique-by.js +5 -0
  11. package/features/array/virtual/at.js +4 -0
  12. package/features/array/virtual/filter-out.js +4 -0
  13. package/features/array/virtual/index.js +3 -0
  14. package/features/array/virtual/unique-by.js +5 -0
  15. package/features/bigint/index.js +4 -0
  16. package/features/bigint/range.js +4 -0
  17. package/features/instance/at.js +7 -3
  18. package/features/instance/filter-out.js +8 -0
  19. package/features/instance/replace-all.js +2 -8
  20. package/features/instance/unique-by.js +8 -0
  21. package/features/number/index.js +1 -0
  22. package/features/number/range.js +4 -0
  23. package/features/string/index.js +2 -0
  24. package/features/string/virtual/index.js +2 -0
  25. package/features/typed-array/at.js +1 -0
  26. package/features/typed-array/filter-out.js +1 -0
  27. package/features/typed-array/index.js +2 -0
  28. package/internals/advance-string-index.js +1 -1
  29. package/internals/array-copy-within.js +1 -1
  30. package/internals/array-fill.js +1 -1
  31. package/internals/array-for-each.js +1 -1
  32. package/internals/array-from.js +1 -1
  33. package/internals/array-includes.js +2 -2
  34. package/internals/array-iteration.js +18 -11
  35. package/internals/array-last-index-of.js +1 -1
  36. package/internals/array-reduce.js +2 -2
  37. package/internals/array-species-create.js +1 -1
  38. package/internals/create-html.js +1 -1
  39. package/internals/date-to-iso-string.js +1 -1
  40. package/internals/descriptors.js +1 -1
  41. package/internals/engine-is-webos-webkit.js +3 -0
  42. package/internals/function-bind.js +1 -1
  43. package/internals/get-substitution.js +40 -0
  44. package/internals/is-array.js +1 -1
  45. package/internals/is-integer.js +1 -1
  46. package/internals/is-regexp.js +1 -1
  47. package/internals/iterators-core.js +10 -3
  48. package/internals/math-expm1.js +1 -1
  49. package/internals/math-fround.js +1 -1
  50. package/internals/math-log1p.js +1 -1
  51. package/internals/math-sign.js +1 -1
  52. package/internals/microtask.js +3 -1
  53. package/internals/number-is-finite.js +1 -1
  54. package/internals/number-parse-float.js +1 -1
  55. package/internals/number-parse-int.js +1 -1
  56. package/internals/object-assign.js +1 -1
  57. package/internals/object-create.js +1 -1
  58. package/internals/object-define-properties.js +1 -1
  59. package/internals/object-define-property.js +1 -1
  60. package/internals/object-get-own-property-descriptor.js +1 -1
  61. package/internals/object-get-own-property-names.js +1 -1
  62. package/internals/object-get-prototype-of.js +1 -1
  63. package/internals/object-keys.js +1 -1
  64. package/internals/object-property-is-enumerable.js +1 -1
  65. package/internals/object-set-prototype-of.js +1 -1
  66. package/internals/object-to-array.js +2 -2
  67. package/internals/object-to-string.js +1 -1
  68. package/internals/range-iterator.js +102 -0
  69. package/internals/regexp-flags.js +1 -1
  70. package/internals/require-object-coercible.js +1 -1
  71. package/internals/same-value-zero.js +1 -1
  72. package/internals/same-value.js +1 -1
  73. package/internals/shared.js +2 -2
  74. package/internals/species-constructor.js +1 -1
  75. package/internals/string-multibyte.js +1 -1
  76. package/internals/string-pad.js +2 -2
  77. package/internals/string-repeat.js +1 -1
  78. package/internals/string-trim.js +3 -3
  79. package/internals/this-number-value.js +1 -1
  80. package/internals/to-index.js +1 -1
  81. package/internals/to-integer.js +1 -1
  82. package/internals/to-length.js +1 -1
  83. package/internals/to-object.js +1 -1
  84. package/internals/to-primitive.js +1 -1
  85. package/modules/es.aggregate-error.js +3 -0
  86. package/modules/es.array.concat.js +1 -1
  87. package/modules/es.array.copy-within.js +2 -2
  88. package/modules/es.array.every.js +1 -1
  89. package/modules/es.array.fill.js +2 -2
  90. package/modules/es.array.filter.js +1 -1
  91. package/modules/es.array.find-index.js +2 -2
  92. package/modules/es.array.find.js +2 -2
  93. package/modules/es.array.flat-map.js +1 -1
  94. package/modules/es.array.flat.js +1 -1
  95. package/modules/es.array.for-each.js +1 -1
  96. package/modules/es.array.from.js +1 -1
  97. package/modules/es.array.includes.js +2 -2
  98. package/modules/es.array.index-of.js +1 -1
  99. package/modules/es.array.is-array.js +1 -1
  100. package/modules/es.array.iterator.js +9 -9
  101. package/modules/es.array.join.js +1 -1
  102. package/modules/es.array.last-index-of.js +1 -1
  103. package/modules/es.array.map.js +1 -1
  104. package/modules/es.array.of.js +1 -1
  105. package/modules/es.array.reduce-right.js +1 -1
  106. package/modules/es.array.reduce.js +1 -1
  107. package/modules/es.array.reverse.js +1 -1
  108. package/modules/es.array.slice.js +1 -1
  109. package/modules/es.array.some.js +1 -1
  110. package/modules/es.array.sort.js +1 -1
  111. package/modules/es.array.species.js +1 -1
  112. package/modules/es.array.splice.js +1 -1
  113. package/modules/es.array.unscopables.flat-map.js +1 -0
  114. package/modules/es.array.unscopables.flat.js +1 -0
  115. package/modules/es.date.now.js +1 -1
  116. package/modules/es.date.to-iso-string.js +1 -1
  117. package/modules/es.date.to-json.js +2 -0
  118. package/modules/es.function.bind.js +1 -1
  119. package/modules/es.function.has-instance.js +1 -1
  120. package/modules/es.global-this.js +1 -1
  121. package/modules/es.json.stringify.js +2 -0
  122. package/modules/es.json.to-string-tag.js +1 -1
  123. package/modules/es.map.js +1 -1
  124. package/modules/es.math.acosh.js +1 -1
  125. package/modules/es.math.asinh.js +1 -1
  126. package/modules/es.math.atanh.js +1 -1
  127. package/modules/es.math.cbrt.js +1 -1
  128. package/modules/es.math.clz32.js +1 -1
  129. package/modules/es.math.cosh.js +1 -1
  130. package/modules/es.math.expm1.js +1 -1
  131. package/modules/es.math.fround.js +1 -1
  132. package/modules/es.math.hypot.js +1 -1
  133. package/modules/es.math.imul.js +1 -1
  134. package/modules/es.math.log10.js +1 -1
  135. package/modules/es.math.log1p.js +1 -1
  136. package/modules/es.math.log2.js +1 -1
  137. package/modules/es.math.sign.js +1 -1
  138. package/modules/es.math.sinh.js +1 -1
  139. package/modules/es.math.tanh.js +1 -1
  140. package/modules/es.math.trunc.js +1 -1
  141. package/modules/es.number.epsilon.js +1 -1
  142. package/modules/es.number.is-finite.js +1 -1
  143. package/modules/es.number.is-integer.js +1 -1
  144. package/modules/es.number.is-nan.js +1 -1
  145. package/modules/es.number.is-safe-integer.js +1 -1
  146. package/modules/es.number.max-safe-integer.js +1 -1
  147. package/modules/es.number.min-safe-integer.js +1 -1
  148. package/modules/es.number.parse-float.js +1 -1
  149. package/modules/es.number.parse-int.js +1 -1
  150. package/modules/es.number.to-fixed.js +1 -1
  151. package/modules/es.number.to-precision.js +1 -1
  152. package/modules/es.object.assign.js +1 -1
  153. package/modules/es.object.create.js +1 -1
  154. package/modules/es.object.define-getter.js +1 -1
  155. package/modules/es.object.define-properties.js +1 -1
  156. package/modules/es.object.define-property.js +1 -1
  157. package/modules/es.object.define-setter.js +1 -1
  158. package/modules/es.object.entries.js +1 -1
  159. package/modules/es.object.freeze.js +1 -1
  160. package/modules/es.object.get-own-property-descriptor.js +1 -1
  161. package/modules/es.object.get-own-property-descriptors.js +1 -1
  162. package/modules/es.object.get-own-property-names.js +1 -1
  163. package/modules/es.object.get-prototype-of.js +1 -1
  164. package/modules/es.object.is-extensible.js +1 -1
  165. package/modules/es.object.is-frozen.js +1 -1
  166. package/modules/es.object.is-sealed.js +1 -1
  167. package/modules/es.object.is.js +1 -1
  168. package/modules/es.object.keys.js +1 -1
  169. package/modules/es.object.lookup-getter.js +1 -1
  170. package/modules/es.object.lookup-setter.js +1 -1
  171. package/modules/es.object.prevent-extensions.js +1 -1
  172. package/modules/es.object.seal.js +1 -1
  173. package/modules/es.object.set-prototype-of.js +1 -1
  174. package/modules/es.object.values.js +1 -1
  175. package/modules/es.parse-float.js +1 -1
  176. package/modules/es.parse-int.js +1 -1
  177. package/modules/es.promise.all-settled.js +1 -1
  178. package/modules/es.promise.any.js +1 -1
  179. package/modules/es.promise.finally.js +1 -1
  180. package/modules/es.promise.js +6 -6
  181. package/modules/es.reflect.apply.js +1 -1
  182. package/modules/es.reflect.construct.js +1 -1
  183. package/modules/es.reflect.define-property.js +1 -1
  184. package/modules/es.reflect.delete-property.js +1 -1
  185. package/modules/es.reflect.get-own-property-descriptor.js +1 -1
  186. package/modules/es.reflect.get-prototype-of.js +1 -1
  187. package/modules/es.reflect.get.js +1 -1
  188. package/modules/es.reflect.has.js +1 -1
  189. package/modules/es.reflect.is-extensible.js +1 -1
  190. package/modules/es.reflect.own-keys.js +1 -1
  191. package/modules/es.reflect.prevent-extensions.js +1 -1
  192. package/modules/es.reflect.set-prototype-of.js +1 -1
  193. package/modules/es.reflect.set.js +1 -1
  194. package/modules/es.set.js +1 -1
  195. package/modules/es.string.anchor.js +1 -1
  196. package/modules/es.string.big.js +1 -1
  197. package/modules/es.string.blink.js +1 -1
  198. package/modules/es.string.bold.js +1 -1
  199. package/modules/es.string.code-point-at.js +1 -1
  200. package/modules/es.string.ends-with.js +1 -1
  201. package/modules/es.string.fixed.js +1 -1
  202. package/modules/es.string.fontcolor.js +1 -1
  203. package/modules/es.string.fontsize.js +1 -1
  204. package/modules/es.string.from-code-point.js +1 -1
  205. package/modules/es.string.includes.js +1 -1
  206. package/modules/es.string.italics.js +1 -1
  207. package/modules/es.string.iterator.js +2 -2
  208. package/modules/es.string.link.js +1 -1
  209. package/modules/es.string.match-all.js +1 -1
  210. package/modules/es.string.pad-end.js +1 -1
  211. package/modules/es.string.pad-start.js +1 -1
  212. package/modules/es.string.raw.js +1 -1
  213. package/modules/es.string.repeat.js +1 -1
  214. package/modules/es.string.replace-all.js +29 -12
  215. package/modules/es.string.small.js +1 -1
  216. package/modules/es.string.starts-with.js +1 -1
  217. package/modules/es.string.strike.js +1 -1
  218. package/modules/es.string.sub.js +1 -1
  219. package/modules/es.string.sup.js +1 -1
  220. package/modules/es.string.trim-end.js +2 -1
  221. package/modules/es.string.trim-start.js +2 -1
  222. package/modules/es.string.trim.js +1 -1
  223. package/modules/es.symbol.async-iterator.js +1 -1
  224. package/modules/es.symbol.has-instance.js +1 -1
  225. package/modules/es.symbol.is-concat-spreadable.js +1 -1
  226. package/modules/es.symbol.iterator.js +1 -1
  227. package/modules/es.symbol.js +12 -12
  228. package/modules/es.symbol.match-all.js +1 -0
  229. package/modules/es.symbol.match.js +1 -1
  230. package/modules/es.symbol.replace.js +1 -1
  231. package/modules/es.symbol.search.js +1 -1
  232. package/modules/es.symbol.species.js +1 -1
  233. package/modules/es.symbol.split.js +1 -1
  234. package/modules/es.symbol.to-primitive.js +1 -1
  235. package/modules/es.symbol.to-string-tag.js +1 -1
  236. package/modules/es.symbol.unscopables.js +1 -1
  237. package/modules/es.weak-map.js +1 -1
  238. package/modules/es.weak-set.js +1 -1
  239. package/modules/esnext.array.at.js +20 -0
  240. package/modules/esnext.array.filter-out.js +14 -0
  241. package/modules/esnext.array.unique-by.js +38 -0
  242. package/modules/esnext.bigint.range.js +14 -0
  243. package/modules/esnext.number.range.js +11 -0
  244. package/modules/esnext.string.at-alternative.js +23 -0
  245. package/modules/esnext.string.at.js +6 -1
  246. package/modules/esnext.typed-array.at.js +1 -0
  247. package/modules/esnext.typed-array.filter-out.js +1 -0
  248. package/package.json +3 -2
  249. package/proposals/array-filtering.js +3 -0
  250. package/proposals/array-unique.js +3 -0
  251. package/proposals/number-range.js +3 -0
  252. package/proposals/relative-indexing-method.js +5 -0
  253. package/stable/instance/replace-all.js +3 -0
  254. package/stage/1.js +3 -0
  255. package/stage/3.js +1 -0
@@ -3,7 +3,7 @@ var toIndexedObject = require('../internals/to-indexed-object');
3
3
  var toLength = require('../internals/to-length');
4
4
 
5
5
  // `String.raw` method
6
- // https://tc39.github.io/ecma262/#sec-string.raw
6
+ // https://tc39.es/ecma262/#sec-string.raw
7
7
  $({ target: 'String', stat: true }, {
8
8
  raw: function raw(template) {
9
9
  var rawTemplate = toIndexedObject(template.raw);
@@ -2,7 +2,7 @@ var $ = require('../internals/export');
2
2
  var repeat = require('../internals/string-repeat');
3
3
 
4
4
  // `String.prototype.repeat` method
5
- // https://tc39.github.io/ecma262/#sec-string.prototype.repeat
5
+ // https://tc39.es/ecma262/#sec-string.prototype.repeat
6
6
  $({ target: 'String', proto: true }, {
7
7
  repeat: repeat
8
8
  });
@@ -3,18 +3,29 @@ var $ = require('../internals/export');
3
3
  var requireObjectCoercible = require('../internals/require-object-coercible');
4
4
  var isRegExp = require('../internals/is-regexp');
5
5
  var getRegExpFlags = require('../internals/regexp-flags');
6
+ var getSubstitution = require('../internals/get-substitution');
6
7
  var wellKnownSymbol = require('../internals/well-known-symbol');
7
8
  var IS_PURE = require('../internals/is-pure');
8
9
 
9
10
  var REPLACE = wellKnownSymbol('replace');
10
11
  var RegExpPrototype = RegExp.prototype;
12
+ var max = Math.max;
13
+
14
+ var stringIndexOf = function (string, searchValue, fromIndex) {
15
+ if (fromIndex > string.length) return -1;
16
+ if (searchValue === '') return fromIndex;
17
+ return string.indexOf(searchValue, fromIndex);
18
+ };
11
19
 
12
20
  // `String.prototype.replaceAll` method
13
- // https://github.com/tc39/proposal-string-replace-all
21
+ // https://tc39.es/ecma262/#sec-string.prototype.replaceall
14
22
  $({ target: 'String', proto: true }, {
15
23
  replaceAll: function replaceAll(searchValue, replaceValue) {
16
24
  var O = requireObjectCoercible(this);
17
- var IS_REG_EXP, flags, replacer, string, searchString, template, result, position, index;
25
+ var IS_REG_EXP, flags, replacer, string, searchString, functionalReplace, searchLength, advanceBy, replacement;
26
+ var position = 0;
27
+ var endOfLastMatch = 0;
28
+ var result = '';
18
29
  if (searchValue != null) {
19
30
  IS_REG_EXP = isRegExp(searchValue);
20
31
  if (IS_REG_EXP) {
@@ -33,17 +44,23 @@ $({ target: 'String', proto: true }, {
33
44
  }
34
45
  string = String(O);
35
46
  searchString = String(searchValue);
36
- if (searchString === '') return replaceAll.call(string, /(?:)/g, replaceValue);
37
- template = string.split(searchString);
38
- if (typeof replaceValue !== 'function') {
39
- return template.join(String(replaceValue));
47
+ functionalReplace = typeof replaceValue === 'function';
48
+ if (!functionalReplace) replaceValue = String(replaceValue);
49
+ searchLength = searchString.length;
50
+ advanceBy = max(1, searchLength);
51
+ position = stringIndexOf(string, searchString, 0);
52
+ while (position !== -1) {
53
+ if (functionalReplace) {
54
+ replacement = String(replaceValue(searchString, position, string));
55
+ } else {
56
+ replacement = getSubstitution(searchString, string, position, [], undefined, replaceValue);
57
+ }
58
+ result += string.slice(endOfLastMatch, position) + replacement;
59
+ endOfLastMatch = position + searchLength;
60
+ position = stringIndexOf(string, searchString, position + advanceBy);
40
61
  }
41
- result = template[0];
42
- position = result.length;
43
- for (index = 1; index < template.length; index++) {
44
- result += String(replaceValue(searchString, position, string));
45
- position += searchString.length + template[index].length;
46
- result += template[index];
62
+ if (endOfLastMatch < string.length) {
63
+ result += string.slice(endOfLastMatch);
47
64
  }
48
65
  return result;
49
66
  }
@@ -4,7 +4,7 @@ var createHTML = require('../internals/create-html');
4
4
  var forcedStringHTMLMethod = require('../internals/string-html-forced');
5
5
 
6
6
  // `String.prototype.small` method
7
- // https://tc39.github.io/ecma262/#sec-string.prototype.small
7
+ // https://tc39.es/ecma262/#sec-string.prototype.small
8
8
  $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('small') }, {
9
9
  small: function small() {
10
10
  return createHTML(this, 'small', '', '');
@@ -18,7 +18,7 @@ var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {
18
18
  }();
19
19
 
20
20
  // `String.prototype.startsWith` method
21
- // https://tc39.github.io/ecma262/#sec-string.prototype.startswith
21
+ // https://tc39.es/ecma262/#sec-string.prototype.startswith
22
22
  $({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
23
23
  startsWith: function startsWith(searchString /* , position = 0 */) {
24
24
  var that = String(requireObjectCoercible(this));
@@ -4,7 +4,7 @@ var createHTML = require('../internals/create-html');
4
4
  var forcedStringHTMLMethod = require('../internals/string-html-forced');
5
5
 
6
6
  // `String.prototype.strike` method
7
- // https://tc39.github.io/ecma262/#sec-string.prototype.strike
7
+ // https://tc39.es/ecma262/#sec-string.prototype.strike
8
8
  $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('strike') }, {
9
9
  strike: function strike() {
10
10
  return createHTML(this, 'strike', '', '');
@@ -4,7 +4,7 @@ var createHTML = require('../internals/create-html');
4
4
  var forcedStringHTMLMethod = require('../internals/string-html-forced');
5
5
 
6
6
  // `String.prototype.sub` method
7
- // https://tc39.github.io/ecma262/#sec-string.prototype.sub
7
+ // https://tc39.es/ecma262/#sec-string.prototype.sub
8
8
  $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sub') }, {
9
9
  sub: function sub() {
10
10
  return createHTML(this, 'sub', '', '');
@@ -4,7 +4,7 @@ var createHTML = require('../internals/create-html');
4
4
  var forcedStringHTMLMethod = require('../internals/string-html-forced');
5
5
 
6
6
  // `String.prototype.sup` method
7
- // https://tc39.github.io/ecma262/#sec-string.prototype.sup
7
+ // https://tc39.es/ecma262/#sec-string.prototype.sup
8
8
  $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sup') }, {
9
9
  sup: function sup() {
10
10
  return createHTML(this, 'sup', '', '');
@@ -10,7 +10,8 @@ var trimEnd = FORCED ? function trimEnd() {
10
10
  } : ''.trimEnd;
11
11
 
12
12
  // `String.prototype.{ trimEnd, trimRight }` methods
13
- // https://github.com/tc39/ecmascript-string-left-right-trim
13
+ // https://tc39.es/ecma262/#sec-string.prototype.trimend
14
+ // https://tc39.es/ecma262/#String.prototype.trimright
14
15
  $({ target: 'String', proto: true, forced: FORCED }, {
15
16
  trimEnd: trimEnd,
16
17
  trimRight: trimEnd
@@ -10,7 +10,8 @@ var trimStart = FORCED ? function trimStart() {
10
10
  } : ''.trimStart;
11
11
 
12
12
  // `String.prototype.{ trimStart, trimLeft }` methods
13
- // https://github.com/tc39/ecmascript-string-left-right-trim
13
+ // https://tc39.es/ecma262/#sec-string.prototype.trimstart
14
+ // https://tc39.es/ecma262/#String.prototype.trimleft
14
15
  $({ target: 'String', proto: true, forced: FORCED }, {
15
16
  trimStart: trimStart,
16
17
  trimLeft: trimStart
@@ -4,7 +4,7 @@ var $trim = require('../internals/string-trim').trim;
4
4
  var forcedStringTrimMethod = require('../internals/string-trim-forced');
5
5
 
6
6
  // `String.prototype.trim` method
7
- // https://tc39.github.io/ecma262/#sec-string.prototype.trim
7
+ // https://tc39.es/ecma262/#sec-string.prototype.trim
8
8
  $({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
9
9
  trim: function trim() {
10
10
  return $trim(this);
@@ -1,5 +1,5 @@
1
1
  var defineWellKnownSymbol = require('../internals/define-well-known-symbol');
2
2
 
3
3
  // `Symbol.asyncIterator` well-known symbol
4
- // https://tc39.github.io/ecma262/#sec-symbol.asynciterator
4
+ // https://tc39.es/ecma262/#sec-symbol.asynciterator
5
5
  defineWellKnownSymbol('asyncIterator');
@@ -1,5 +1,5 @@
1
1
  var defineWellKnownSymbol = require('../internals/define-well-known-symbol');
2
2
 
3
3
  // `Symbol.hasInstance` well-known symbol
4
- // https://tc39.github.io/ecma262/#sec-symbol.hasinstance
4
+ // https://tc39.es/ecma262/#sec-symbol.hasinstance
5
5
  defineWellKnownSymbol('hasInstance');
@@ -1,5 +1,5 @@
1
1
  var defineWellKnownSymbol = require('../internals/define-well-known-symbol');
2
2
 
3
3
  // `Symbol.isConcatSpreadable` well-known symbol
4
- // https://tc39.github.io/ecma262/#sec-symbol.isconcatspreadable
4
+ // https://tc39.es/ecma262/#sec-symbol.isconcatspreadable
5
5
  defineWellKnownSymbol('isConcatSpreadable');
@@ -1,5 +1,5 @@
1
1
  var defineWellKnownSymbol = require('../internals/define-well-known-symbol');
2
2
 
3
3
  // `Symbol.iterator` well-known symbol
4
- // https://tc39.github.io/ecma262/#sec-symbol.iterator
4
+ // https://tc39.es/ecma262/#sec-symbol.iterator
5
5
  defineWellKnownSymbol('iterator');
@@ -159,7 +159,7 @@ var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
159
159
  };
160
160
 
161
161
  // `Symbol` constructor
162
- // https://tc39.github.io/ecma262/#sec-symbol-constructor
162
+ // https://tc39.es/ecma262/#sec-symbol-constructor
163
163
  if (!NATIVE_SYMBOL) {
164
164
  $Symbol = function Symbol() {
165
165
  if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
@@ -216,7 +216,7 @@ $forEach(objectKeys(WellKnownSymbolsStore), function (name) {
216
216
 
217
217
  $({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
218
218
  // `Symbol.for` method
219
- // https://tc39.github.io/ecma262/#sec-symbol.for
219
+ // https://tc39.es/ecma262/#sec-symbol.for
220
220
  'for': function (key) {
221
221
  var string = String(key);
222
222
  if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
@@ -226,7 +226,7 @@ $({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
226
226
  return symbol;
227
227
  },
228
228
  // `Symbol.keyFor` method
229
- // https://tc39.github.io/ecma262/#sec-symbol.keyfor
229
+ // https://tc39.es/ecma262/#sec-symbol.keyfor
230
230
  keyFor: function keyFor(sym) {
231
231
  if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
232
232
  if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
@@ -237,25 +237,25 @@ $({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
237
237
 
238
238
  $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
239
239
  // `Object.create` method
240
- // https://tc39.github.io/ecma262/#sec-object.create
240
+ // https://tc39.es/ecma262/#sec-object.create
241
241
  create: $create,
242
242
  // `Object.defineProperty` method
243
- // https://tc39.github.io/ecma262/#sec-object.defineproperty
243
+ // https://tc39.es/ecma262/#sec-object.defineproperty
244
244
  defineProperty: $defineProperty,
245
245
  // `Object.defineProperties` method
246
- // https://tc39.github.io/ecma262/#sec-object.defineproperties
246
+ // https://tc39.es/ecma262/#sec-object.defineproperties
247
247
  defineProperties: $defineProperties,
248
248
  // `Object.getOwnPropertyDescriptor` method
249
- // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
249
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
250
250
  getOwnPropertyDescriptor: $getOwnPropertyDescriptor
251
251
  });
252
252
 
253
253
  $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {
254
254
  // `Object.getOwnPropertyNames` method
255
- // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
255
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
256
256
  getOwnPropertyNames: $getOwnPropertyNames,
257
257
  // `Object.getOwnPropertySymbols` method
258
- // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols
258
+ // https://tc39.es/ecma262/#sec-object.getownpropertysymbols
259
259
  getOwnPropertySymbols: $getOwnPropertySymbols
260
260
  });
261
261
 
@@ -268,7 +268,7 @@ $({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymb
268
268
  });
269
269
 
270
270
  // `JSON.stringify` method behavior with symbols
271
- // https://tc39.github.io/ecma262/#sec-json.stringify
271
+ // https://tc39.es/ecma262/#sec-json.stringify
272
272
  if ($stringify) {
273
273
  var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {
274
274
  var symbol = $Symbol();
@@ -300,12 +300,12 @@ if ($stringify) {
300
300
  }
301
301
 
302
302
  // `Symbol.prototype[@@toPrimitive]` method
303
- // https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
303
+ // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
304
304
  if (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {
305
305
  createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
306
306
  }
307
307
  // `Symbol.prototype[@@toStringTag]` property
308
- // https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
308
+ // https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
309
309
  setToStringTag($Symbol, SYMBOL);
310
310
 
311
311
  hiddenKeys[HIDDEN] = true;
@@ -1,4 +1,5 @@
1
1
  var defineWellKnownSymbol = require('../internals/define-well-known-symbol');
2
2
 
3
3
  // `Symbol.matchAll` well-known symbol
4
+ // https://tc39.es/ecma262/#sec-symbol.matchall
4
5
  defineWellKnownSymbol('matchAll');
@@ -1,5 +1,5 @@
1
1
  var defineWellKnownSymbol = require('../internals/define-well-known-symbol');
2
2
 
3
3
  // `Symbol.match` well-known symbol
4
- // https://tc39.github.io/ecma262/#sec-symbol.match
4
+ // https://tc39.es/ecma262/#sec-symbol.match
5
5
  defineWellKnownSymbol('match');
@@ -1,5 +1,5 @@
1
1
  var defineWellKnownSymbol = require('../internals/define-well-known-symbol');
2
2
 
3
3
  // `Symbol.replace` well-known symbol
4
- // https://tc39.github.io/ecma262/#sec-symbol.replace
4
+ // https://tc39.es/ecma262/#sec-symbol.replace
5
5
  defineWellKnownSymbol('replace');
@@ -1,5 +1,5 @@
1
1
  var defineWellKnownSymbol = require('../internals/define-well-known-symbol');
2
2
 
3
3
  // `Symbol.search` well-known symbol
4
- // https://tc39.github.io/ecma262/#sec-symbol.search
4
+ // https://tc39.es/ecma262/#sec-symbol.search
5
5
  defineWellKnownSymbol('search');
@@ -1,5 +1,5 @@
1
1
  var defineWellKnownSymbol = require('../internals/define-well-known-symbol');
2
2
 
3
3
  // `Symbol.species` well-known symbol
4
- // https://tc39.github.io/ecma262/#sec-symbol.species
4
+ // https://tc39.es/ecma262/#sec-symbol.species
5
5
  defineWellKnownSymbol('species');
@@ -1,5 +1,5 @@
1
1
  var defineWellKnownSymbol = require('../internals/define-well-known-symbol');
2
2
 
3
3
  // `Symbol.split` well-known symbol
4
- // https://tc39.github.io/ecma262/#sec-symbol.split
4
+ // https://tc39.es/ecma262/#sec-symbol.split
5
5
  defineWellKnownSymbol('split');
@@ -1,5 +1,5 @@
1
1
  var defineWellKnownSymbol = require('../internals/define-well-known-symbol');
2
2
 
3
3
  // `Symbol.toPrimitive` well-known symbol
4
- // https://tc39.github.io/ecma262/#sec-symbol.toprimitive
4
+ // https://tc39.es/ecma262/#sec-symbol.toprimitive
5
5
  defineWellKnownSymbol('toPrimitive');
@@ -1,5 +1,5 @@
1
1
  var defineWellKnownSymbol = require('../internals/define-well-known-symbol');
2
2
 
3
3
  // `Symbol.toStringTag` well-known symbol
4
- // https://tc39.github.io/ecma262/#sec-symbol.tostringtag
4
+ // https://tc39.es/ecma262/#sec-symbol.tostringtag
5
5
  defineWellKnownSymbol('toStringTag');
@@ -1,5 +1,5 @@
1
1
  var defineWellKnownSymbol = require('../internals/define-well-known-symbol');
2
2
 
3
3
  // `Symbol.unscopables` well-known symbol
4
- // https://tc39.github.io/ecma262/#sec-symbol.unscopables
4
+ // https://tc39.es/ecma262/#sec-symbol.unscopables
5
5
  defineWellKnownSymbol('unscopables');
@@ -19,7 +19,7 @@ var wrapper = function (init) {
19
19
  };
20
20
 
21
21
  // `WeakMap` constructor
22
- // https://tc39.github.io/ecma262/#sec-weakmap-constructor
22
+ // https://tc39.es/ecma262/#sec-weakmap-constructor
23
23
  var $WeakMap = module.exports = collection('WeakMap', wrapper, collectionWeak);
24
24
 
25
25
  // IE11 WeakMap frozen keys fix
@@ -3,7 +3,7 @@ var collection = require('../internals/collection');
3
3
  var collectionWeak = require('../internals/collection-weak');
4
4
 
5
5
  // `WeakSet` constructor
6
- // https://tc39.github.io/ecma262/#sec-weakset-constructor
6
+ // https://tc39.es/ecma262/#sec-weakset-constructor
7
7
  collection('WeakSet', function (init) {
8
8
  return function WeakSet() { return init(this, arguments.length ? arguments[0] : undefined); };
9
9
  }, collectionWeak);
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+ var $ = require('../internals/export');
3
+ var toObject = require('../internals/to-object');
4
+ var toLength = require('../internals/to-length');
5
+ var toInteger = require('../internals/to-integer');
6
+ var addToUnscopables = require('../internals/add-to-unscopables');
7
+
8
+ // `Array.prototype.at` method
9
+ // https://github.com/tc39/proposal-relative-indexing-method
10
+ $({ target: 'Array', proto: true }, {
11
+ at: function at(index) {
12
+ var O = toObject(this);
13
+ var len = toLength(O.length);
14
+ var relativeIndex = toInteger(index);
15
+ var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
16
+ return (k < 0 || k >= len) ? undefined : O[k];
17
+ }
18
+ });
19
+
20
+ addToUnscopables('at');
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+ var $ = require('../internals/export');
3
+ var $filterOut = require('../internals/array-iteration').filterOut;
4
+ var addToUnscopables = require('../internals/add-to-unscopables');
5
+
6
+ // `Array.prototype.filterOut` method
7
+ // https://github.com/tc39/proposal-array-filtering
8
+ $({ target: 'Array', proto: true }, {
9
+ filterOut: function filterOut(callbackfn /* , thisArg */) {
10
+ return $filterOut(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
11
+ }
12
+ });
13
+
14
+ addToUnscopables('filterOut');
@@ -0,0 +1,38 @@
1
+ 'use strict';
2
+ var $ = require('../internals/export');
3
+ var toLength = require('../internals/to-length');
4
+ var toObject = require('../internals/to-object');
5
+ var getBuiltIn = require('../internals/get-built-in');
6
+ var arraySpeciesCreate = require('../internals/array-species-create');
7
+ var addToUnscopables = require('../internals/add-to-unscopables');
8
+
9
+ var push = [].push;
10
+
11
+ // `Array.prototype.uniqueBy` method
12
+ // https://github.com/tc39/proposal-array-unique
13
+ $({ target: 'Array', proto: true }, {
14
+ uniqueBy: function uniqueBy(resolver) {
15
+ var that = toObject(this);
16
+ var length = toLength(that.length);
17
+ var result = arraySpeciesCreate(that, 0);
18
+ var Map = getBuiltIn('Map');
19
+ var map = new Map();
20
+ var resolverFunction, index, item, key;
21
+ if (typeof resolver == 'function') resolverFunction = resolver;
22
+ else if (resolver == null) resolverFunction = function (value) {
23
+ return value;
24
+ };
25
+ else throw new TypeError('Incorrect resolver!');
26
+ for (index = 0; index < length; index++) {
27
+ item = that[index];
28
+ key = resolverFunction(item);
29
+ if (!map.has(key)) map.set(key, item);
30
+ }
31
+ map.forEach(function (value) {
32
+ push.call(result, value);
33
+ });
34
+ return result;
35
+ }
36
+ });
37
+
38
+ addToUnscopables('uniqueBy');
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+ var $ = require('../internals/export');
3
+ var RangeIterator = require('../internals/range-iterator');
4
+
5
+ // `BigInt.range` method
6
+ // https://github.com/tc39/proposal-Number.range
7
+ if (typeof BigInt == 'function') {
8
+ $({ target: 'BigInt', stat: true }, {
9
+ range: function range(start, end, option) {
10
+ // eslint-disable-next-line no-undef
11
+ return new RangeIterator(start, end, option, 'bigint', BigInt(0), BigInt(1));
12
+ }
13
+ });
14
+ }
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+ var $ = require('../internals/export');
3
+ var RangeIterator = require('../internals/range-iterator');
4
+
5
+ // `Number.range` method
6
+ // https://github.com/tc39/proposal-Number.range
7
+ $({ target: 'Number', stat: true }, {
8
+ range: function range(start, end, option) {
9
+ return new RangeIterator(start, end, option, 'number', 0, 1);
10
+ }
11
+ });
@@ -0,0 +1,23 @@
1
+ // TODO: disabled by default because of the conflict with another proposal
2
+ 'use strict';
3
+ var $ = require('../internals/export');
4
+ var requireObjectCoercible = require('../internals/require-object-coercible');
5
+ var toLength = require('../internals/to-length');
6
+ var toInteger = require('../internals/to-integer');
7
+ var fails = require('../internals/fails');
8
+
9
+ var FORCED = fails(function () {
10
+ return '𠮷'.at(0) !== '\uD842';
11
+ });
12
+
13
+ // `String.prototype.at` method
14
+ // https://github.com/tc39/proposal-relative-indexing-method
15
+ $({ target: 'String', proto: true, forced: FORCED }, {
16
+ at: function at(index) {
17
+ var S = String(requireObjectCoercible(this));
18
+ var len = toLength(S.length);
19
+ var relativeIndex = toInteger(index);
20
+ var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
21
+ return (k < 0 || k >= len) ? undefined : S.charAt(k);
22
+ }
23
+ });
@@ -1,10 +1,15 @@
1
1
  'use strict';
2
2
  var $ = require('../internals/export');
3
3
  var charAt = require('../internals/string-multibyte').charAt;
4
+ var fails = require('../internals/fails');
5
+
6
+ var FORCED = fails(function () {
7
+ return '𠮷'.at(0) !== '𠮷';
8
+ });
4
9
 
5
10
  // `String.prototype.at` method
6
11
  // https://github.com/mathiasbynens/String.prototype.at
7
- $({ target: 'String', proto: true }, {
12
+ $({ target: 'String', proto: true, forced: FORCED }, {
8
13
  at: function at(pos) {
9
14
  return charAt(this, pos);
10
15
  }
@@ -0,0 +1 @@
1
+ // empty
@@ -0,0 +1 @@
1
+ // empty
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "core-js-pure",
3
3
  "description": "Standard library",
4
- "version": "3.7.0",
4
+ "version": "3.8.3",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/zloirock/core-js.git"
@@ -53,5 +53,6 @@
53
53
  ],
54
54
  "scripts": {
55
55
  "postinstall": "node -e \"try{require('./postinstall')}catch(e){}\""
56
- }
56
+ },
57
+ "gitHead": "a88734f1d7d8c1b5bb797e1b8ece2ec1961111c6"
57
58
  }
@@ -0,0 +1,3 @@
1
+ // https://github.com/tc39/proposal-array-filtering
2
+ require('../modules/esnext.array.filter-out');
3
+ require('../modules/esnext.typed-array.filter-out');
@@ -0,0 +1,3 @@
1
+ // https://github.com/tc39/proposal-array-unique
2
+ require('../modules/es.map');
3
+ require('../modules/esnext.array.unique-by');
@@ -0,0 +1,3 @@
1
+ // https://github.com/tc39/proposal-Number.range
2
+ require('../modules/esnext.bigint.range');
3
+ require('../modules/esnext.number.range');
@@ -0,0 +1,5 @@
1
+ // https://github.com/tc39/proposal-relative-indexing-method
2
+ require('../modules/esnext.array.at');
3
+ // TODO: disabled by default because of the conflict with another proposal
4
+ // require('../modules/esnext.string.at-alternative');
5
+ require('../modules/esnext.typed-array.at');
@@ -0,0 +1,3 @@
1
+ var parent = require('../../es/instance/replace-all');
2
+
3
+ module.exports = parent;
package/stage/1.js CHANGED
@@ -1,10 +1,13 @@
1
+ require('../proposals/array-filtering');
1
2
  require('../proposals/array-last');
3
+ require('../proposals/array-unique');
2
4
  require('../proposals/collection-methods');
3
5
  require('../proposals/collection-of-from');
4
6
  require('../proposals/keys-composition');
5
7
  require('../proposals/math-extensions');
6
8
  require('../proposals/math-signbit');
7
9
  require('../proposals/number-from-string');
10
+ require('../proposals/number-range');
8
11
  require('../proposals/object-iteration');
9
12
  require('../proposals/observable');
10
13
  require('../proposals/pattern-matching');
package/stage/3.js CHANGED
@@ -1,3 +1,4 @@
1
+ require('../proposals/relative-indexing-method');
1
2
  var parent = require('./4');
2
3
 
3
4
  module.exports = parent;