core-js 3.14.0 → 3.16.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.
Files changed (321) hide show
  1. package/README.md +2 -3
  2. package/es/aggregate-error.js +1 -1
  3. package/es/array/entries.js +1 -0
  4. package/es/array/index.js +2 -1
  5. package/es/array/iterator.js +1 -0
  6. package/es/array/keys.js +1 -0
  7. package/es/array/values.js +1 -0
  8. package/es/array/virtual/entries.js +1 -0
  9. package/es/array/virtual/index.js +1 -0
  10. package/es/array/virtual/iterator.js +1 -0
  11. package/es/array/virtual/keys.js +1 -0
  12. package/es/array/virtual/values.js +1 -0
  13. package/es/date/get-year.js +4 -0
  14. package/es/date/index.js +4 -1
  15. package/es/date/set-year.js +4 -0
  16. package/es/date/to-gmt-string.js +4 -0
  17. package/es/escape.js +4 -0
  18. package/es/index.js +7 -0
  19. package/es/map/index.js +1 -1
  20. package/es/promise/all-settled.js +2 -1
  21. package/es/promise/any.js +2 -1
  22. package/es/promise/finally.js +1 -0
  23. package/es/promise/index.js +1 -1
  24. package/es/reflect/index.js +1 -0
  25. package/es/reflect/to-string-tag.js +1 -0
  26. package/es/regexp/constructor.js +3 -0
  27. package/es/regexp/dot-all.js +7 -0
  28. package/es/regexp/index.js +1 -0
  29. package/es/regexp/match.js +1 -0
  30. package/es/regexp/replace.js +1 -0
  31. package/es/regexp/search.js +1 -0
  32. package/es/regexp/split.js +1 -0
  33. package/es/regexp/sticky.js +2 -0
  34. package/es/set/index.js +2 -2
  35. package/es/string/index.js +2 -0
  36. package/es/string/iterator.js +1 -0
  37. package/es/string/match-all.js +2 -0
  38. package/es/string/replace-all.js +2 -0
  39. package/es/string/substr.js +4 -0
  40. package/es/string/virtual/index.js +3 -0
  41. package/es/string/virtual/iterator.js +1 -0
  42. package/es/string/virtual/match-all.js +2 -0
  43. package/es/string/virtual/replace-all.js +2 -0
  44. package/es/string/virtual/substr.js +4 -0
  45. package/es/symbol/is-concat-spreadable.js +1 -1
  46. package/es/symbol/iterator.js +3 -2
  47. package/es/symbol/match-all.js +2 -0
  48. package/es/symbol/match.js +1 -0
  49. package/es/symbol/replace.js +1 -0
  50. package/es/symbol/search.js +1 -0
  51. package/es/symbol/split.js +1 -0
  52. package/es/symbol/to-primitive.js +1 -0
  53. package/es/symbol/to-string-tag.js +2 -2
  54. package/es/typed-array/entries.js +1 -0
  55. package/es/typed-array/iterator.js +1 -0
  56. package/es/typed-array/keys.js +1 -0
  57. package/es/typed-array/methods.js +2 -1
  58. package/es/typed-array/values.js +1 -0
  59. package/es/unescape.js +4 -0
  60. package/es/weak-map/index.js +1 -1
  61. package/es/weak-set/index.js +1 -1
  62. package/features/array/filter-out.js +1 -0
  63. package/features/array/filter-reject.js +4 -0
  64. package/features/array/group-by.js +4 -0
  65. package/features/array/index.js +3 -0
  66. package/features/array/virtual/filter-out.js +1 -0
  67. package/features/array/virtual/filter-reject.js +4 -0
  68. package/features/array/virtual/group-by.js +4 -0
  69. package/features/array/virtual/index.js +3 -0
  70. package/features/async-iterator/as-indexed-pairs.js +0 -2
  71. package/features/async-iterator/drop.js +0 -2
  72. package/features/async-iterator/every.js +0 -2
  73. package/features/async-iterator/filter.js +0 -2
  74. package/features/async-iterator/find.js +0 -2
  75. package/features/async-iterator/flat-map.js +0 -2
  76. package/features/async-iterator/for-each.js +0 -2
  77. package/features/async-iterator/from.js +1 -0
  78. package/features/async-iterator/index.js +1 -0
  79. package/features/async-iterator/map.js +0 -2
  80. package/features/async-iterator/reduce.js +0 -2
  81. package/features/async-iterator/some.js +0 -2
  82. package/features/async-iterator/take.js +0 -2
  83. package/features/async-iterator/to-array.js +0 -2
  84. package/features/date/get-year.js +3 -0
  85. package/features/date/set-year.js +3 -0
  86. package/features/date/to-gmt-string.js +3 -0
  87. package/features/escape.js +3 -0
  88. package/features/get-iterator-method.js +2 -1
  89. package/features/get-iterator.js +2 -1
  90. package/features/index.js +11 -0
  91. package/features/instance/filter-out.js +1 -0
  92. package/features/instance/filter-reject.js +8 -0
  93. package/features/instance/group-by.js +8 -0
  94. package/features/is-iterable.js +2 -1
  95. package/features/iterator/as-indexed-pairs.js +0 -2
  96. package/features/iterator/drop.js +0 -2
  97. package/features/iterator/every.js +0 -2
  98. package/features/iterator/filter.js +0 -2
  99. package/features/iterator/find.js +0 -2
  100. package/features/iterator/flat-map.js +0 -2
  101. package/features/iterator/for-each.js +0 -2
  102. package/features/iterator/from.js +1 -0
  103. package/features/iterator/index.js +1 -0
  104. package/features/iterator/map.js +0 -2
  105. package/features/iterator/reduce.js +0 -2
  106. package/features/iterator/some.js +0 -2
  107. package/features/iterator/take.js +0 -2
  108. package/features/iterator/to-array.js +0 -2
  109. package/features/map/from.js +1 -0
  110. package/features/map/of.js +1 -2
  111. package/features/number/range.js +1 -0
  112. package/features/regexp/dot-all.js +3 -0
  113. package/features/set/difference.js +1 -0
  114. package/features/set/from.js +1 -0
  115. package/features/set/intersection.js +3 -0
  116. package/features/set/is-disjoint-from.js +3 -0
  117. package/features/set/is-subset-of.js +1 -0
  118. package/features/set/is-superset-of.js +3 -0
  119. package/features/set/of.js +1 -2
  120. package/features/set/symmetric-difference.js +1 -0
  121. package/features/set/union.js +1 -0
  122. package/features/string/code-points.js +1 -0
  123. package/features/string/substr.js +3 -0
  124. package/features/string/virtual/code-points.js +1 -0
  125. package/features/string/virtual/substr.js +3 -0
  126. package/features/typed-array/copy-within.js +3 -1
  127. package/features/typed-array/entries.js +3 -1
  128. package/features/typed-array/every.js +3 -1
  129. package/features/typed-array/fill.js +3 -1
  130. package/features/typed-array/filter-out.js +1 -0
  131. package/features/typed-array/filter-reject.js +1 -0
  132. package/features/typed-array/filter.js +3 -1
  133. package/features/typed-array/find-index.js +3 -1
  134. package/features/typed-array/find.js +3 -1
  135. package/features/typed-array/float32-array.js +1 -1
  136. package/features/typed-array/float64-array.js +1 -1
  137. package/features/typed-array/for-each.js +3 -1
  138. package/features/typed-array/from.js +3 -1
  139. package/features/typed-array/group-by.js +1 -0
  140. package/features/typed-array/includes.js +3 -1
  141. package/features/typed-array/index-of.js +3 -1
  142. package/features/typed-array/index.js +4 -1
  143. package/features/typed-array/int16-array.js +1 -1
  144. package/features/typed-array/int32-array.js +1 -1
  145. package/features/typed-array/int8-array.js +1 -1
  146. package/features/typed-array/iterator.js +3 -1
  147. package/features/typed-array/join.js +3 -1
  148. package/features/typed-array/keys.js +3 -1
  149. package/features/typed-array/last-index-of.js +3 -1
  150. package/features/typed-array/map.js +3 -1
  151. package/features/typed-array/of.js +3 -1
  152. package/features/typed-array/reduce-right.js +3 -1
  153. package/features/typed-array/reduce.js +3 -1
  154. package/features/typed-array/reverse.js +3 -1
  155. package/features/typed-array/set.js +3 -1
  156. package/features/typed-array/slice.js +3 -1
  157. package/features/typed-array/some.js +3 -1
  158. package/features/typed-array/sort.js +3 -1
  159. package/features/typed-array/subarray.js +3 -1
  160. package/features/typed-array/to-locale-string.js +3 -1
  161. package/features/typed-array/to-string.js +3 -1
  162. package/features/typed-array/uint16-array.js +1 -1
  163. package/features/typed-array/uint32-array.js +1 -1
  164. package/features/typed-array/uint8-array.js +1 -1
  165. package/features/typed-array/uint8-clamped-array.js +1 -1
  166. package/features/typed-array/values.js +3 -1
  167. package/features/unescape.js +3 -0
  168. package/features/weak-map/from.js +1 -0
  169. package/features/weak-map/index.js +1 -0
  170. package/features/weak-map/of.js +1 -2
  171. package/features/weak-set/from.js +1 -0
  172. package/features/weak-set/index.js +1 -0
  173. package/features/weak-set/of.js +1 -2
  174. package/internals/array-buffer-view-core.js +16 -10
  175. package/internals/array-from-constructor-and-list.js +7 -0
  176. package/internals/array-group-by.js +33 -0
  177. package/internals/array-iteration-from-last.js +6 -6
  178. package/internals/array-iteration.js +6 -6
  179. package/internals/array-species-constructor.js +20 -0
  180. package/internals/array-species-create.js +2 -15
  181. package/internals/collection.js +1 -1
  182. package/internals/create-html.js +3 -2
  183. package/internals/create-property.js +2 -2
  184. package/internals/date-to-primitive.js +5 -4
  185. package/internals/engine-v8-version.js +2 -1
  186. package/internals/fix-regexp-well-known-symbol-logic.js +5 -62
  187. package/internals/get-built-in.js +1 -3
  188. package/internals/get-map-iterator.js +1 -4
  189. package/internals/get-set-iterator.js +1 -4
  190. package/internals/internal-metadata.js +33 -3
  191. package/internals/is-symbol.js +9 -0
  192. package/internals/number-parse-float.js +2 -1
  193. package/internals/number-parse-int.js +2 -1
  194. package/internals/object-create.js +17 -12
  195. package/internals/object-define-property.js +2 -2
  196. package/internals/object-get-own-property-descriptor.js +2 -2
  197. package/internals/ordinary-to-primitive.js +11 -0
  198. package/internals/regexp-exec.js +34 -8
  199. package/internals/regexp-sticky-helpers.js +3 -7
  200. package/internals/regexp-unsupported-dot-all.js +7 -0
  201. package/internals/regexp-unsupported-ncg.js +8 -0
  202. package/internals/set-global.js +2 -2
  203. package/internals/shared.js +1 -1
  204. package/internals/string-multibyte.js +3 -2
  205. package/internals/string-pad.js +3 -2
  206. package/internals/string-repeat.js +2 -1
  207. package/internals/string-trim.js +2 -1
  208. package/internals/task.js +9 -4
  209. package/internals/to-primitive.js +17 -9
  210. package/internals/to-property-key.js +9 -0
  211. package/internals/to-string.js +6 -0
  212. package/internals/typed-array-constructor.js +13 -5
  213. package/internals/typed-array-from-species-and-list.js +3 -8
  214. package/internals/typed-array-species-constructor.js +11 -0
  215. package/modules/es.aggregate-error.js +2 -1
  216. package/modules/es.array.sort.js +2 -1
  217. package/modules/es.date.get-year.js +17 -0
  218. package/modules/es.date.set-year.js +18 -0
  219. package/modules/es.date.to-gmt-string.js +7 -0
  220. package/modules/es.date.to-json.js +1 -1
  221. package/modules/es.date.to-string.js +1 -1
  222. package/modules/es.escape.js +36 -0
  223. package/modules/es.number.constructor.js +3 -1
  224. package/modules/es.object.lookup-getter.js +2 -2
  225. package/modules/es.object.lookup-setter.js +2 -2
  226. package/modules/es.promise.js +3 -2
  227. package/modules/es.reflect.define-property.js +2 -2
  228. package/modules/es.regexp.constructor.js +126 -24
  229. package/modules/es.regexp.dot-all.js +22 -0
  230. package/modules/es.regexp.flags.js +10 -8
  231. package/modules/es.regexp.sticky.js +1 -1
  232. package/modules/es.regexp.to-string.js +3 -2
  233. package/modules/es.string.ends-with.js +3 -2
  234. package/modules/es.string.includes.js +3 -2
  235. package/modules/es.string.iterator.js +2 -1
  236. package/modules/es.string.match-all.js +6 -5
  237. package/modules/es.string.match.js +9 -8
  238. package/modules/es.string.raw.js +3 -2
  239. package/modules/es.string.replace-all.js +7 -6
  240. package/modules/es.string.replace.js +45 -17
  241. package/modules/es.string.search.js +8 -7
  242. package/modules/es.string.split.js +22 -8
  243. package/modules/es.string.starts-with.js +3 -2
  244. package/modules/es.string.substr.js +26 -0
  245. package/modules/es.symbol.js +8 -13
  246. package/modules/es.typed-array.map.js +2 -3
  247. package/modules/es.typed-array.slice.js +3 -4
  248. package/modules/es.typed-array.subarray.js +3 -2
  249. package/modules/es.unescape.js +40 -0
  250. package/modules/es.weak-map.js +1 -1
  251. package/modules/esnext.array.filter-out.js +3 -2
  252. package/modules/esnext.array.filter-reject.js +14 -0
  253. package/modules/esnext.array.group-by.js +16 -0
  254. package/modules/esnext.map.merge.js +2 -1
  255. package/modules/esnext.string.at-alternative.js +3 -2
  256. package/modules/esnext.string.code-points.js +2 -1
  257. package/modules/esnext.typed-array.filter-out.js +3 -2
  258. package/modules/esnext.typed-array.filter-reject.js +14 -0
  259. package/modules/esnext.typed-array.group-by.js +14 -0
  260. package/modules/web.url-search-params.js +56 -36
  261. package/modules/web.url.js +17 -16
  262. package/package.json +3 -4
  263. package/postinstall.js +4 -2
  264. package/proposals/array-filtering.js +4 -0
  265. package/proposals/array-grouping.js +3 -0
  266. package/stable/aggregate-error.js +1 -0
  267. package/stable/date/get-year.js +3 -0
  268. package/stable/date/set-year.js +3 -0
  269. package/stable/date/to-gmt-string.js +3 -0
  270. package/stable/dom-collections/index.js +1 -0
  271. package/stable/dom-collections/iterator.js +1 -0
  272. package/stable/escape.js +3 -0
  273. package/stable/index.js +7 -0
  274. package/stable/map/index.js +1 -0
  275. package/stable/object/from-entries.js +1 -0
  276. package/stable/object/index.js +1 -0
  277. package/stable/promise/all-settled.js +1 -0
  278. package/stable/promise/any.js +1 -0
  279. package/stable/promise/index.js +1 -0
  280. package/stable/regexp/dot-all.js +3 -0
  281. package/stable/set/index.js +1 -0
  282. package/stable/string/substr.js +3 -0
  283. package/stable/string/virtual/substr.js +3 -0
  284. package/stable/symbol/index.js +1 -0
  285. package/stable/symbol/iterator.js +1 -0
  286. package/stable/typed-array/copy-within.js +3 -1
  287. package/stable/typed-array/entries.js +3 -1
  288. package/stable/typed-array/every.js +3 -1
  289. package/stable/typed-array/fill.js +3 -1
  290. package/stable/typed-array/filter.js +3 -1
  291. package/stable/typed-array/find-index.js +3 -1
  292. package/stable/typed-array/find.js +3 -1
  293. package/stable/typed-array/for-each.js +3 -1
  294. package/stable/typed-array/from.js +3 -1
  295. package/stable/typed-array/includes.js +3 -1
  296. package/stable/typed-array/index-of.js +3 -1
  297. package/stable/typed-array/iterator.js +3 -1
  298. package/stable/typed-array/join.js +3 -1
  299. package/stable/typed-array/keys.js +3 -1
  300. package/stable/typed-array/last-index-of.js +3 -1
  301. package/stable/typed-array/map.js +3 -1
  302. package/stable/typed-array/of.js +3 -1
  303. package/stable/typed-array/reduce-right.js +3 -1
  304. package/stable/typed-array/reduce.js +3 -1
  305. package/stable/typed-array/reverse.js +3 -1
  306. package/stable/typed-array/set.js +3 -1
  307. package/stable/typed-array/slice.js +3 -1
  308. package/stable/typed-array/some.js +3 -1
  309. package/stable/typed-array/sort.js +3 -1
  310. package/stable/typed-array/subarray.js +3 -1
  311. package/stable/typed-array/to-locale-string.js +3 -1
  312. package/stable/typed-array/to-string.js +3 -1
  313. package/stable/typed-array/values.js +3 -1
  314. package/stable/unescape.js +3 -0
  315. package/stable/url-search-params/index.js +1 -0
  316. package/stable/weak-map/index.js +1 -0
  317. package/stable/weak-set/index.js +1 -0
  318. package/stage/1.js +1 -0
  319. package/stage/2.js +0 -1
  320. package/stage/3.js +1 -0
  321. package/es/array/virtual/filter-out.js +0 -4
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.from');
1
+ var parent = require('../../stable/typed-array/from');
2
+
3
+ module.exports = parent;
@@ -0,0 +1 @@
1
+ require('../../modules/esnext.typed-array.group-by');
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.includes');
1
+ var parent = require('../../stable/typed-array/includes');
2
+
3
+ module.exports = parent;
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.index-of');
1
+ var parent = require('../../stable/typed-array/index-of');
2
+
3
+ module.exports = parent;
@@ -1,9 +1,12 @@
1
- var parent = require('../../es/typed-array');
1
+ var parent = require('../../stable/typed-array');
2
2
  require('../../modules/es.map');
3
3
  require('../../modules/esnext.typed-array.at');
4
+ // TODO: Remove from `core-js@4`
4
5
  require('../../modules/esnext.typed-array.filter-out');
6
+ require('../../modules/esnext.typed-array.filter-reject');
5
7
  require('../../modules/esnext.typed-array.find-last');
6
8
  require('../../modules/esnext.typed-array.find-last-index');
9
+ require('../../modules/esnext.typed-array.group-by');
7
10
  require('../../modules/esnext.typed-array.unique-by');
8
11
 
9
12
  module.exports = parent;
@@ -1,3 +1,3 @@
1
- var parent = require('../../es/typed-array/int16-array');
1
+ var parent = require('../../stable/typed-array/int16-array');
2
2
 
3
3
  module.exports = parent;
@@ -1,3 +1,3 @@
1
- var parent = require('../../es/typed-array/int32-array');
1
+ var parent = require('../../stable/typed-array/int32-array');
2
2
 
3
3
  module.exports = parent;
@@ -1,3 +1,3 @@
1
- var parent = require('../../es/typed-array/int8-array');
1
+ var parent = require('../../stable/typed-array/int8-array');
2
2
 
3
3
  module.exports = parent;
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.iterator');
1
+ var parent = require('../../stable/typed-array/iterator');
2
+
3
+ module.exports = parent;
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.join');
1
+ var parent = require('../../stable/typed-array/join');
2
+
3
+ module.exports = parent;
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.iterator');
1
+ var parent = require('../../stable/typed-array/keys');
2
+
3
+ module.exports = parent;
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.last-index-of');
1
+ var parent = require('../../stable/typed-array/last-index-of');
2
+
3
+ module.exports = parent;
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.map');
1
+ var parent = require('../../stable/typed-array/map');
2
+
3
+ module.exports = parent;
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.of');
1
+ var parent = require('../../stable/typed-array/of');
2
+
3
+ module.exports = parent;
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.reduce-right');
1
+ var parent = require('../../stable/typed-array/reduce-right');
2
+
3
+ module.exports = parent;
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.reduce');
1
+ var parent = require('../../stable/typed-array/reduce');
2
+
3
+ module.exports = parent;
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.reverse');
1
+ var parent = require('../../stable/typed-array/reverse');
2
+
3
+ module.exports = parent;
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.set');
1
+ var parent = require('../../stable/typed-array/set');
2
+
3
+ module.exports = parent;
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.slice');
1
+ var parent = require('../../stable/typed-array/slice');
2
+
3
+ module.exports = parent;
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.some');
1
+ var parent = require('../../stable/typed-array/some');
2
+
3
+ module.exports = parent;
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.sort');
1
+ var parent = require('../../stable/typed-array/sort');
2
+
3
+ module.exports = parent;
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.subarray');
1
+ var parent = require('../../stable/typed-array/subarray');
2
+
3
+ module.exports = parent;
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.to-locale-string');
1
+ var parent = require('../../stable/typed-array/to-locale-string');
2
+
3
+ module.exports = parent;
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.to-string');
1
+ var parent = require('../../stable/typed-array/to-string');
2
+
3
+ module.exports = parent;
@@ -1,3 +1,3 @@
1
- var parent = require('../../es/typed-array/uint16-array');
1
+ var parent = require('../../stable/typed-array/uint16-array');
2
2
 
3
3
  module.exports = parent;
@@ -1,3 +1,3 @@
1
- var parent = require('../../es/typed-array/uint32-array');
1
+ var parent = require('../../stable/typed-array/uint32-array');
2
2
 
3
3
  module.exports = parent;
@@ -1,3 +1,3 @@
1
- var parent = require('../../es/typed-array/uint8-array');
1
+ var parent = require('../../stable/typed-array/uint8-array');
2
2
 
3
3
  module.exports = parent;
@@ -1,3 +1,3 @@
1
- var parent = require('../../es/typed-array/uint8-clamped-array');
1
+ var parent = require('../../stable/typed-array/uint8-clamped-array');
2
2
 
3
3
  module.exports = parent;
@@ -1 +1,3 @@
1
- require('../../modules/es.typed-array.iterator');
1
+ var parent = require('../../stable/typed-array/values');
2
+
3
+ module.exports = parent;
@@ -0,0 +1,3 @@
1
+ var parent = require('../stable/unescape');
2
+
3
+ module.exports = parent;
@@ -1,4 +1,5 @@
1
1
  'use strict';
2
+ require('../../modules/es.array.iterator');
2
3
  require('../../modules/es.string.iterator');
3
4
  require('../../modules/es.weak-map');
4
5
  require('../../modules/esnext.weak-map.from');
@@ -1,4 +1,5 @@
1
1
  var parent = require('../../es/weak-map');
2
+ require('../../modules/es.string.iterator');
2
3
  require('../../modules/esnext.weak-map.emplace');
3
4
  require('../../modules/esnext.weak-map.from');
4
5
  require('../../modules/esnext.weak-map.of');
@@ -1,8 +1,7 @@
1
1
  'use strict';
2
- require('../../modules/es.string.iterator');
2
+ require('../../modules/es.array.iterator');
3
3
  require('../../modules/es.weak-map');
4
4
  require('../../modules/esnext.weak-map.of');
5
- require('../../modules/web.dom-collections.iterator');
6
5
  var path = require('../../internals/path');
7
6
 
8
7
  var WeakMap = path.WeakMap;
@@ -1,4 +1,5 @@
1
1
  'use strict';
2
+ require('../../modules/es.array.iterator');
2
3
  require('../../modules/es.string.iterator');
3
4
  require('../../modules/es.weak-set');
4
5
  require('../../modules/esnext.weak-set.from');
@@ -1,4 +1,5 @@
1
1
  var parent = require('../../es/weak-set');
2
+ require('../../modules/es.string.iterator');
2
3
  require('../../modules/esnext.weak-set.add-all');
3
4
  require('../../modules/esnext.weak-set.delete-all');
4
5
  require('../../modules/esnext.weak-set.from');
@@ -1,8 +1,7 @@
1
1
  'use strict';
2
- require('../../modules/es.string.iterator');
2
+ require('../../modules/es.array.iterator');
3
3
  require('../../modules/es.weak-set');
4
4
  require('../../modules/esnext.weak-set.of');
5
- require('../../modules/web.dom-collections.iterator');
6
5
  var path = require('../../internals/path');
7
6
 
8
7
  var WeakSet = path.WeakSet;
@@ -24,10 +24,11 @@ var isPrototypeOf = ObjectPrototype.isPrototypeOf;
24
24
 
25
25
  var TO_STRING_TAG = wellKnownSymbol('toStringTag');
26
26
  var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
27
+ var TYPED_ARRAY_CONSTRUCTOR = uid('TYPED_ARRAY_CONSTRUCTOR');
27
28
  // Fixing native typed arrays in Opera Presto crashes the browser, see #595
28
29
  var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';
29
30
  var TYPED_ARRAY_TAG_REQIRED = false;
30
- var NAME;
31
+ var NAME, Constructor, Prototype;
31
32
 
32
33
  var TypedArrayConstructorsList = {
33
34
  Int8Array: 1,
@@ -67,14 +68,9 @@ var aTypedArray = function (it) {
67
68
  };
68
69
 
69
70
  var aTypedArrayConstructor = function (C) {
70
- if (setPrototypeOf) {
71
- if (isPrototypeOf.call(TypedArray, C)) return C;
72
- } else for (var ARRAY in TypedArrayConstructorsList) if (has(TypedArrayConstructorsList, NAME)) {
73
- var TypedArrayConstructor = global[ARRAY];
74
- if (TypedArrayConstructor && (C === TypedArrayConstructor || isPrototypeOf.call(TypedArrayConstructor, C))) {
75
- return C;
76
- }
77
- } throw TypeError('Target is not a typed array constructor');
71
+ if (setPrototypeOf && !isPrototypeOf.call(TypedArray, C)) {
72
+ throw TypeError('Target is not a typed array constructor');
73
+ } return C;
78
74
  };
79
75
 
80
76
  var exportTypedArrayMethod = function (KEY, property, forced) {
@@ -117,7 +113,16 @@ var exportTypedArrayStaticMethod = function (KEY, property, forced) {
117
113
  };
118
114
 
119
115
  for (NAME in TypedArrayConstructorsList) {
120
- if (!global[NAME]) NATIVE_ARRAY_BUFFER_VIEWS = false;
116
+ Constructor = global[NAME];
117
+ Prototype = Constructor && Constructor.prototype;
118
+ if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);
119
+ else NATIVE_ARRAY_BUFFER_VIEWS = false;
120
+ }
121
+
122
+ for (NAME in BigIntArrayConstructorsList) {
123
+ Constructor = global[NAME];
124
+ Prototype = Constructor && Constructor.prototype;
125
+ if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);
121
126
  }
122
127
 
123
128
  // WebKit bug - typed arrays constructors prototype is Object.prototype
@@ -155,6 +160,7 @@ if (DESCRIPTORS && !has(TypedArrayPrototype, TO_STRING_TAG)) {
155
160
 
156
161
  module.exports = {
157
162
  NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
163
+ TYPED_ARRAY_CONSTRUCTOR: TYPED_ARRAY_CONSTRUCTOR,
158
164
  TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,
159
165
  aTypedArray: aTypedArray,
160
166
  aTypedArrayConstructor: aTypedArrayConstructor,
@@ -0,0 +1,7 @@
1
+ module.exports = function (Constructor, list) {
2
+ var index = 0;
3
+ var length = list.length;
4
+ var result = new Constructor(length);
5
+ while (length > index) result[index] = list[index++];
6
+ return result;
7
+ };
@@ -0,0 +1,33 @@
1
+ var bind = require('../internals/function-bind-context');
2
+ var IndexedObject = require('../internals/indexed-object');
3
+ var toObject = require('../internals/to-object');
4
+ var toLength = require('../internals/to-length');
5
+ var toPropertyKey = require('../internals/to-property-key');
6
+ var objectCreate = require('../internals/object-create');
7
+ var arrayFromConstructorAndList = require('../internals/array-from-constructor-and-list');
8
+
9
+ var push = [].push;
10
+
11
+ module.exports = function ($this, callbackfn, that, specificConstructor) {
12
+ var O = toObject($this);
13
+ var self = IndexedObject(O);
14
+ var boundFunction = bind(callbackfn, that, 3);
15
+ var target = objectCreate(null);
16
+ var length = toLength(self.length);
17
+ var index = 0;
18
+ var Constructor, key, value;
19
+ for (;length > index; index++) {
20
+ value = self[index];
21
+ key = toPropertyKey(boundFunction(value, index, O));
22
+ // in some IE10 builds, `hasOwnProperty` returns incorrect result on integer keys
23
+ // but since it's a `null` prototype object, we can safely use `in`
24
+ if (key in target) push.call(target[key], value);
25
+ else target[key] = [value];
26
+ }
27
+ if (specificConstructor) {
28
+ Constructor = specificConstructor(O);
29
+ if (Constructor !== Array) {
30
+ for (key in target) target[key] = arrayFromConstructorAndList(Constructor, target[key]);
31
+ }
32
+ } return target;
33
+ };
@@ -5,7 +5,7 @@ var toLength = require('../internals/to-length');
5
5
 
6
6
  // `Array.prototype.{ findLast, findLastIndex }` methods implementation
7
7
  var createMethod = function (TYPE) {
8
- var IS_FIND_INDEX = TYPE == 6;
8
+ var IS_FIND_LAST_INDEX = TYPE == 1;
9
9
  return function ($this, callbackfn, that) {
10
10
  var O = toObject($this);
11
11
  var self = IndexedObject(O);
@@ -16,19 +16,19 @@ var createMethod = function (TYPE) {
16
16
  value = self[index];
17
17
  result = boundFunction(value, index, O);
18
18
  if (result) switch (TYPE) {
19
- case 5: return value; // find
20
- case 6: return index; // findIndex
19
+ case 0: return value; // findLast
20
+ case 1: return index; // findLastIndex
21
21
  }
22
22
  }
23
- return IS_FIND_INDEX ? -1 : undefined;
23
+ return IS_FIND_LAST_INDEX ? -1 : undefined;
24
24
  };
25
25
  };
26
26
 
27
27
  module.exports = {
28
28
  // `Array.prototype.findLast` method
29
29
  // https://github.com/tc39/proposal-array-find-from-last
30
- findLast: createMethod(5),
30
+ findLast: createMethod(0),
31
31
  // `Array.prototype.findLastIndex` method
32
32
  // https://github.com/tc39/proposal-array-find-from-last
33
- findLastIndex: createMethod(6)
33
+ findLastIndex: createMethod(1)
34
34
  };
@@ -6,14 +6,14 @@ var arraySpeciesCreate = require('../internals/array-species-create');
6
6
 
7
7
  var push = [].push;
8
8
 
9
- // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
9
+ // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
10
10
  var createMethod = function (TYPE) {
11
11
  var IS_MAP = TYPE == 1;
12
12
  var IS_FILTER = TYPE == 2;
13
13
  var IS_SOME = TYPE == 3;
14
14
  var IS_EVERY = TYPE == 4;
15
15
  var IS_FIND_INDEX = TYPE == 6;
16
- var IS_FILTER_OUT = TYPE == 7;
16
+ var IS_FILTER_REJECT = TYPE == 7;
17
17
  var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
18
18
  return function ($this, callbackfn, that, specificCreate) {
19
19
  var O = toObject($this);
@@ -22,7 +22,7 @@ var createMethod = function (TYPE) {
22
22
  var length = toLength(self.length);
23
23
  var index = 0;
24
24
  var create = specificCreate || arraySpeciesCreate;
25
- var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
25
+ var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
26
26
  var value, result;
27
27
  for (;length > index; index++) if (NO_HOLES || index in self) {
28
28
  value = self[index];
@@ -36,7 +36,7 @@ var createMethod = function (TYPE) {
36
36
  case 2: push.call(target, value); // filter
37
37
  } else switch (TYPE) {
38
38
  case 4: return false; // every
39
- case 7: push.call(target, value); // filterOut
39
+ case 7: push.call(target, value); // filterReject
40
40
  }
41
41
  }
42
42
  }
@@ -66,7 +66,7 @@ module.exports = {
66
66
  // `Array.prototype.findIndex` method
67
67
  // https://tc39.es/ecma262/#sec-array.prototype.findIndex
68
68
  findIndex: createMethod(6),
69
- // `Array.prototype.filterOut` method
69
+ // `Array.prototype.filterReject` method
70
70
  // https://github.com/tc39/proposal-array-filtering
71
- filterOut: createMethod(7)
71
+ filterReject: createMethod(7)
72
72
  };
@@ -0,0 +1,20 @@
1
+ var isObject = require('../internals/is-object');
2
+ var isArray = require('../internals/is-array');
3
+ var wellKnownSymbol = require('../internals/well-known-symbol');
4
+
5
+ var SPECIES = wellKnownSymbol('species');
6
+
7
+ // a part of `ArraySpeciesCreate` abstract operation
8
+ // https://tc39.es/ecma262/#sec-arrayspeciescreate
9
+ module.exports = function (originalArray) {
10
+ var C;
11
+ if (isArray(originalArray)) {
12
+ C = originalArray.constructor;
13
+ // cross-realm fallback
14
+ if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
15
+ else if (isObject(C)) {
16
+ C = C[SPECIES];
17
+ if (C === null) C = undefined;
18
+ }
19
+ } return C === undefined ? Array : C;
20
+ };
@@ -1,20 +1,7 @@
1
- var isObject = require('../internals/is-object');
2
- var isArray = require('../internals/is-array');
3
- var wellKnownSymbol = require('../internals/well-known-symbol');
4
-
5
- var SPECIES = wellKnownSymbol('species');
1
+ var arraySpeciesConstructor = require('../internals/array-species-constructor');
6
2
 
7
3
  // `ArraySpeciesCreate` abstract operation
8
4
  // https://tc39.es/ecma262/#sec-arrayspeciescreate
9
5
  module.exports = function (originalArray, length) {
10
- var C;
11
- if (isArray(originalArray)) {
12
- C = originalArray.constructor;
13
- // cross-realm fallback
14
- if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
15
- else if (isObject(C)) {
16
- C = C[SPECIES];
17
- if (C === null) C = undefined;
18
- }
19
- } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
6
+ return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
20
7
  };
@@ -50,7 +50,7 @@ module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
50
50
  if (REPLACE) {
51
51
  // create collection constructor
52
52
  Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
53
- InternalMetadataModule.REQUIRED = true;
53
+ InternalMetadataModule.enable();
54
54
  } else if (isForced(CONSTRUCTOR_NAME, true)) {
55
55
  var instance = new Constructor();
56
56
  // early implementations not supports chaining
@@ -1,12 +1,13 @@
1
1
  var requireObjectCoercible = require('../internals/require-object-coercible');
2
+ var toString = require('../internals/to-string');
2
3
 
3
4
  var quot = /"/g;
4
5
 
5
6
  // `CreateHTML` abstract operation
6
7
  // https://tc39.es/ecma262/#sec-createhtml
7
8
  module.exports = function (string, tag, attribute, value) {
8
- var S = String(requireObjectCoercible(string));
9
+ var S = toString(requireObjectCoercible(string));
9
10
  var p1 = '<' + tag;
10
- if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '&quot;') + '"';
11
+ if (attribute !== '') p1 += ' ' + attribute + '="' + toString(value).replace(quot, '&quot;') + '"';
11
12
  return p1 + '>' + S + '</' + tag + '>';
12
13
  };
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
- var toPrimitive = require('../internals/to-primitive');
2
+ var toPropertyKey = require('../internals/to-property-key');
3
3
  var definePropertyModule = require('../internals/object-define-property');
4
4
  var createPropertyDescriptor = require('../internals/create-property-descriptor');
5
5
 
6
6
  module.exports = function (object, key, value) {
7
- var propertyKey = toPrimitive(key);
7
+ var propertyKey = toPropertyKey(key);
8
8
  if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
9
9
  else object[propertyKey] = value;
10
10
  };
@@ -1,11 +1,12 @@
1
1
  'use strict';
2
2
  var anObject = require('../internals/an-object');
3
- var toPrimitive = require('../internals/to-primitive');
3
+ var ordinaryToPrimitive = require('../internals/ordinary-to-primitive');
4
4
 
5
5
  // `Date.prototype[@@toPrimitive](hint)` method implementation
6
6
  // https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive
7
7
  module.exports = function (hint) {
8
- if (hint !== 'string' && hint !== 'number' && hint !== 'default') {
9
- throw TypeError('Incorrect hint');
10
- } return toPrimitive(anObject(this), hint !== 'number');
8
+ anObject(this);
9
+ if (hint === 'string' || hint === 'default') hint = 'string';
10
+ else if (hint !== 'number') throw TypeError('Incorrect hint');
11
+ return ordinaryToPrimitive(this, hint);
11
12
  };
@@ -2,7 +2,8 @@ var global = require('../internals/global');
2
2
  var userAgent = require('../internals/engine-user-agent');
3
3
 
4
4
  var process = global.process;
5
- var versions = process && process.versions;
5
+ var Deno = global.Deno;
6
+ var versions = process && process.versions || Deno && Deno.version;
6
7
  var v8 = versions && versions.v8;
7
8
  var match, version;
8
9
 
@@ -10,47 +10,7 @@ var createNonEnumerableProperty = require('../internals/create-non-enumerable-pr
10
10
  var SPECIES = wellKnownSymbol('species');
11
11
  var RegExpPrototype = RegExp.prototype;
12
12
 
13
- var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
14
- // #replace needs built-in support for named groups.
15
- // #match works fine because it just return the exec results, even if it has
16
- // a "grops" property.
17
- var re = /./;
18
- re.exec = function () {
19
- var result = [];
20
- result.groups = { a: '7' };
21
- return result;
22
- };
23
- return ''.replace(re, '$<a>') !== '7';
24
- });
25
-
26
- // IE <= 11 replaces $0 with the whole match, as if it was $&
27
- // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
28
- var REPLACE_KEEPS_$0 = (function () {
29
- // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
30
- return 'a'.replace(/./, '$0') === '$0';
31
- })();
32
-
33
- var REPLACE = wellKnownSymbol('replace');
34
- // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
35
- var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
36
- if (/./[REPLACE]) {
37
- return /./[REPLACE]('a', '$0') === '';
38
- }
39
- return false;
40
- })();
41
-
42
- // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
43
- // Weex JS has frozen built-in prototypes, so use try / catch wrapper
44
- var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
45
- // eslint-disable-next-line regexp/no-empty-group -- required for testing
46
- var re = /(?:)/;
47
- var originalExec = re.exec;
48
- re.exec = function () { return originalExec.apply(this, arguments); };
49
- var result = 'ab'.split(re);
50
- return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
51
- });
52
-
53
- module.exports = function (KEY, length, exec, sham) {
13
+ module.exports = function (KEY, exec, FORCED, SHAM) {
54
14
  var SYMBOL = wellKnownSymbol(KEY);
55
15
 
56
16
  var DELEGATES_TO_SYMBOL = !fails(function () {
@@ -87,12 +47,7 @@ module.exports = function (KEY, length, exec, sham) {
87
47
  if (
88
48
  !DELEGATES_TO_SYMBOL ||
89
49
  !DELEGATES_TO_EXEC ||
90
- (KEY === 'replace' && !(
91
- REPLACE_SUPPORTS_NAMED_GROUPS &&
92
- REPLACE_KEEPS_$0 &&
93
- !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
94
- )) ||
95
- (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
50
+ FORCED
96
51
  ) {
97
52
  var nativeRegExpMethod = /./[SYMBOL];
98
53
  var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
@@ -107,23 +62,11 @@ module.exports = function (KEY, length, exec, sham) {
107
62
  return { done: true, value: nativeMethod.call(str, regexp, arg2) };
108
63
  }
109
64
  return { done: false };
110
- }, {
111
- REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
112
- REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
113
65
  });
114
- var stringMethod = methods[0];
115
- var regexMethod = methods[1];
116
66
 
117
- redefine(String.prototype, KEY, stringMethod);
118
- redefine(RegExpPrototype, SYMBOL, length == 2
119
- // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
120
- // 21.2.5.11 RegExp.prototype[@@split](string, limit)
121
- ? function (string, arg) { return regexMethod.call(string, this, arg); }
122
- // 21.2.5.6 RegExp.prototype[@@match](string)
123
- // 21.2.5.9 RegExp.prototype[@@search](string)
124
- : function (string) { return regexMethod.call(string, this); }
125
- );
67
+ redefine(String.prototype, KEY, methods[0]);
68
+ redefine(RegExpPrototype, SYMBOL, methods[1]);
126
69
  }
127
70
 
128
- if (sham) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
71
+ if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
129
72
  };