core-js 3.1.0 → 3.1.4

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 (772) hide show
  1. package/README.md +2 -2
  2. package/es/array/concat.js +2 -1
  3. package/es/array/copy-within.js +2 -1
  4. package/es/array/entries.js +2 -1
  5. package/es/array/every.js +2 -1
  6. package/es/array/fill.js +2 -1
  7. package/es/array/filter.js +2 -1
  8. package/es/array/find-index.js +2 -1
  9. package/es/array/find.js +2 -1
  10. package/es/array/flat-map.js +2 -1
  11. package/es/array/flat.js +2 -1
  12. package/es/array/for-each.js +2 -1
  13. package/es/array/from.js +2 -1
  14. package/es/array/includes.js +2 -1
  15. package/es/array/index-of.js +2 -1
  16. package/es/array/index.js +2 -1
  17. package/es/array/is-array.js +2 -1
  18. package/es/array/iterator.js +2 -1
  19. package/es/array/join.js +2 -1
  20. package/es/array/keys.js +2 -1
  21. package/es/array/last-index-of.js +2 -1
  22. package/es/array/map.js +2 -1
  23. package/es/array/of.js +2 -1
  24. package/es/array/reduce-right.js +2 -1
  25. package/es/array/reduce.js +2 -1
  26. package/es/array/reverse.js +2 -1
  27. package/es/array/slice.js +2 -1
  28. package/es/array/some.js +2 -1
  29. package/es/array/sort.js +2 -1
  30. package/es/array/splice.js +2 -1
  31. package/es/array/values.js +2 -1
  32. package/es/array/virtual/concat.js +2 -1
  33. package/es/array/virtual/copy-within.js +2 -1
  34. package/es/array/virtual/entries.js +2 -1
  35. package/es/array/virtual/every.js +2 -1
  36. package/es/array/virtual/fill.js +2 -1
  37. package/es/array/virtual/filter.js +2 -1
  38. package/es/array/virtual/find-index.js +2 -1
  39. package/es/array/virtual/find.js +2 -1
  40. package/es/array/virtual/flat-map.js +2 -1
  41. package/es/array/virtual/flat.js +2 -1
  42. package/es/array/virtual/for-each.js +2 -1
  43. package/es/array/virtual/includes.js +2 -1
  44. package/es/array/virtual/index-of.js +2 -1
  45. package/es/array/virtual/index.js +2 -1
  46. package/es/array/virtual/iterator.js +2 -1
  47. package/es/array/virtual/join.js +2 -1
  48. package/es/array/virtual/keys.js +2 -1
  49. package/es/array/virtual/last-index-of.js +2 -1
  50. package/es/array/virtual/map.js +2 -1
  51. package/es/array/virtual/reduce-right.js +2 -1
  52. package/es/array/virtual/reduce.js +2 -1
  53. package/es/array/virtual/reverse.js +2 -1
  54. package/es/array/virtual/slice.js +2 -1
  55. package/es/array/virtual/some.js +2 -1
  56. package/es/array/virtual/sort.js +2 -1
  57. package/es/array/virtual/splice.js +2 -1
  58. package/es/array/virtual/values.js +2 -1
  59. package/es/array-buffer/constructor.js +2 -1
  60. package/es/array-buffer/index.js +2 -1
  61. package/es/array-buffer/is-view.js +2 -1
  62. package/es/data-view/index.js +2 -1
  63. package/es/date/index.js +2 -1
  64. package/es/date/now.js +2 -1
  65. package/es/date/to-iso-string.js +2 -1
  66. package/es/date/to-json.js +2 -1
  67. package/es/function/bind.js +2 -1
  68. package/es/function/has-instance.js +2 -1
  69. package/es/function/index.js +2 -1
  70. package/es/function/virtual/bind.js +2 -1
  71. package/es/function/virtual/index.js +2 -1
  72. package/es/instance/bind.js +1 -0
  73. package/es/instance/code-point-at.js +1 -0
  74. package/es/instance/concat.js +1 -0
  75. package/es/instance/copy-within.js +1 -0
  76. package/es/instance/ends-with.js +1 -0
  77. package/es/instance/entries.js +1 -0
  78. package/es/instance/every.js +1 -0
  79. package/es/instance/fill.js +1 -0
  80. package/es/instance/filter.js +1 -0
  81. package/es/instance/find-index.js +1 -0
  82. package/es/instance/find.js +1 -0
  83. package/es/instance/flags.js +1 -0
  84. package/es/instance/flat-map.js +1 -0
  85. package/es/instance/flat.js +1 -0
  86. package/es/instance/for-each.js +1 -0
  87. package/es/instance/includes.js +1 -0
  88. package/es/instance/index-of.js +1 -0
  89. package/es/instance/keys.js +1 -0
  90. package/es/instance/last-index-of.js +1 -0
  91. package/es/instance/map.js +1 -0
  92. package/es/instance/match-all.js +1 -0
  93. package/es/instance/pad-end.js +1 -0
  94. package/es/instance/pad-start.js +1 -0
  95. package/es/instance/reduce-right.js +1 -0
  96. package/es/instance/reduce.js +1 -0
  97. package/es/instance/repeat.js +1 -0
  98. package/es/instance/reverse.js +1 -0
  99. package/es/instance/slice.js +1 -0
  100. package/es/instance/some.js +1 -0
  101. package/es/instance/sort.js +1 -0
  102. package/es/instance/splice.js +1 -0
  103. package/es/instance/starts-with.js +1 -0
  104. package/es/instance/trim-end.js +1 -0
  105. package/es/instance/trim-left.js +1 -0
  106. package/es/instance/trim-right.js +1 -0
  107. package/es/instance/trim-start.js +1 -0
  108. package/es/instance/trim.js +1 -0
  109. package/es/instance/values.js +1 -0
  110. package/es/json/index.js +0 -1
  111. package/es/map/index.js +2 -1
  112. package/es/math/acosh.js +2 -1
  113. package/es/math/asinh.js +2 -1
  114. package/es/math/atanh.js +2 -1
  115. package/es/math/cbrt.js +2 -1
  116. package/es/math/clz32.js +2 -1
  117. package/es/math/cosh.js +2 -1
  118. package/es/math/expm1.js +2 -1
  119. package/es/math/fround.js +2 -1
  120. package/es/math/hypot.js +2 -1
  121. package/es/math/imul.js +2 -1
  122. package/es/math/index.js +2 -1
  123. package/es/math/log10.js +2 -1
  124. package/es/math/log1p.js +2 -1
  125. package/es/math/log2.js +2 -1
  126. package/es/math/sign.js +2 -1
  127. package/es/math/sinh.js +2 -1
  128. package/es/math/tanh.js +2 -1
  129. package/es/math/trunc.js +2 -1
  130. package/es/number/index.js +2 -1
  131. package/es/number/is-finite.js +2 -1
  132. package/es/number/is-integer.js +2 -1
  133. package/es/number/is-nan.js +2 -1
  134. package/es/number/is-safe-integer.js +2 -1
  135. package/es/number/parse-float.js +2 -1
  136. package/es/number/parse-int.js +2 -1
  137. package/es/number/to-fixed.js +2 -1
  138. package/es/number/to-precision.js +2 -1
  139. package/es/number/virtual/index.js +2 -1
  140. package/es/number/virtual/to-fixed.js +2 -1
  141. package/es/number/virtual/to-precision.js +2 -1
  142. package/es/object/assign.js +2 -1
  143. package/es/object/create.js +3 -1
  144. package/es/object/define-getter.js +2 -1
  145. package/es/object/define-properties.js +3 -1
  146. package/es/object/define-property.js +3 -1
  147. package/es/object/define-setter.js +2 -1
  148. package/es/object/entries.js +2 -1
  149. package/es/object/freeze.js +2 -1
  150. package/es/object/from-entries.js +2 -1
  151. package/es/object/get-own-property-descriptor.js +3 -1
  152. package/es/object/get-own-property-descriptors.js +2 -1
  153. package/es/object/get-own-property-names.js +3 -1
  154. package/es/object/get-own-property-symbols.js +2 -1
  155. package/es/object/get-prototype-of.js +2 -1
  156. package/es/object/index.js +2 -1
  157. package/es/object/is-extensible.js +2 -1
  158. package/es/object/is-frozen.js +2 -1
  159. package/es/object/is-sealed.js +2 -1
  160. package/es/object/is.js +2 -1
  161. package/es/object/keys.js +2 -1
  162. package/es/object/lookup-getter.js +2 -1
  163. package/es/object/lookup-setter.js +2 -1
  164. package/es/object/prevent-extensions.js +2 -1
  165. package/es/object/seal.js +2 -1
  166. package/es/object/set-prototype-of.js +2 -1
  167. package/es/object/values.js +2 -1
  168. package/es/parse-float.js +2 -1
  169. package/es/parse-int.js +2 -1
  170. package/es/promise/finally.js +2 -1
  171. package/es/promise/index.js +2 -1
  172. package/es/reflect/apply.js +2 -1
  173. package/es/reflect/construct.js +2 -1
  174. package/es/reflect/define-property.js +2 -1
  175. package/es/reflect/delete-property.js +2 -1
  176. package/es/reflect/get-own-property-descriptor.js +2 -1
  177. package/es/reflect/get-prototype-of.js +2 -1
  178. package/es/reflect/get.js +2 -1
  179. package/es/reflect/has.js +2 -1
  180. package/es/reflect/index.js +2 -1
  181. package/es/reflect/is-extensible.js +2 -1
  182. package/es/reflect/own-keys.js +2 -1
  183. package/es/reflect/prevent-extensions.js +2 -1
  184. package/es/reflect/set-prototype-of.js +2 -1
  185. package/es/reflect/set.js +2 -1
  186. package/es/regexp/match.js +3 -1
  187. package/es/regexp/replace.js +3 -1
  188. package/es/regexp/search.js +3 -1
  189. package/es/regexp/split.js +3 -1
  190. package/es/set/index.js +2 -1
  191. package/es/string/anchor.js +2 -1
  192. package/es/string/big.js +2 -1
  193. package/es/string/blink.js +2 -1
  194. package/es/string/bold.js +2 -1
  195. package/es/string/code-point-at.js +2 -1
  196. package/es/string/ends-with.js +2 -1
  197. package/es/string/fixed.js +2 -1
  198. package/es/string/fontcolor.js +2 -1
  199. package/es/string/fontsize.js +2 -1
  200. package/es/string/from-code-point.js +2 -1
  201. package/es/string/includes.js +2 -1
  202. package/es/string/index.js +2 -1
  203. package/es/string/italics.js +2 -1
  204. package/es/string/iterator.js +3 -1
  205. package/es/string/link.js +2 -1
  206. package/es/string/match-all.js +2 -1
  207. package/es/string/match.js +2 -1
  208. package/es/string/pad-end.js +2 -1
  209. package/es/string/pad-start.js +2 -1
  210. package/es/string/raw.js +2 -1
  211. package/es/string/repeat.js +2 -1
  212. package/es/string/replace.js +2 -1
  213. package/es/string/search.js +2 -1
  214. package/es/string/small.js +2 -1
  215. package/es/string/split.js +2 -1
  216. package/es/string/starts-with.js +2 -1
  217. package/es/string/strike.js +2 -1
  218. package/es/string/sub.js +2 -1
  219. package/es/string/sup.js +2 -1
  220. package/es/string/trim-end.js +2 -1
  221. package/es/string/trim-left.js +2 -1
  222. package/es/string/trim-right.js +2 -1
  223. package/es/string/trim-start.js +2 -1
  224. package/es/string/trim.js +2 -1
  225. package/es/string/virtual/anchor.js +2 -1
  226. package/es/string/virtual/big.js +2 -1
  227. package/es/string/virtual/blink.js +2 -1
  228. package/es/string/virtual/bold.js +2 -1
  229. package/es/string/virtual/code-point-at.js +2 -1
  230. package/es/string/virtual/ends-with.js +2 -1
  231. package/es/string/virtual/fixed.js +2 -1
  232. package/es/string/virtual/fontcolor.js +2 -1
  233. package/es/string/virtual/fontsize.js +2 -1
  234. package/es/string/virtual/includes.js +2 -1
  235. package/es/string/virtual/index.js +2 -1
  236. package/es/string/virtual/italics.js +2 -1
  237. package/es/string/virtual/iterator.js +2 -1
  238. package/es/string/virtual/link.js +2 -1
  239. package/es/string/virtual/match-all.js +2 -1
  240. package/es/string/virtual/pad-end.js +2 -1
  241. package/es/string/virtual/pad-start.js +2 -1
  242. package/es/string/virtual/repeat.js +2 -1
  243. package/es/string/virtual/small.js +2 -1
  244. package/es/string/virtual/starts-with.js +2 -1
  245. package/es/string/virtual/strike.js +2 -1
  246. package/es/string/virtual/sub.js +2 -1
  247. package/es/string/virtual/sup.js +2 -1
  248. package/es/string/virtual/trim-end.js +2 -1
  249. package/es/string/virtual/trim-left.js +2 -1
  250. package/es/string/virtual/trim-right.js +2 -1
  251. package/es/string/virtual/trim-start.js +2 -1
  252. package/es/string/virtual/trim.js +2 -1
  253. package/es/symbol/async-iterator.js +2 -1
  254. package/es/symbol/for.js +2 -1
  255. package/es/symbol/has-instance.js +2 -1
  256. package/es/symbol/index.js +2 -1
  257. package/es/symbol/is-concat-spreadable.js +2 -1
  258. package/es/symbol/iterator.js +2 -1
  259. package/es/symbol/key-for.js +2 -1
  260. package/es/symbol/match-all.js +2 -1
  261. package/es/symbol/match.js +2 -1
  262. package/es/symbol/replace.js +2 -1
  263. package/es/symbol/search.js +2 -1
  264. package/es/symbol/species.js +3 -1
  265. package/es/symbol/split.js +2 -1
  266. package/es/symbol/to-primitive.js +2 -1
  267. package/es/symbol/to-string-tag.js +2 -1
  268. package/es/symbol/unscopables.js +2 -1
  269. package/es/typed-array/float32-array.js +2 -1
  270. package/es/typed-array/float64-array.js +2 -1
  271. package/es/typed-array/int16-array.js +2 -1
  272. package/es/typed-array/int32-array.js +2 -1
  273. package/es/typed-array/int8-array.js +2 -1
  274. package/es/typed-array/uint16-array.js +2 -1
  275. package/es/typed-array/uint32-array.js +2 -1
  276. package/es/typed-array/uint8-array.js +2 -1
  277. package/es/typed-array/uint8-clamped-array.js +2 -1
  278. package/es/weak-map/index.js +2 -1
  279. package/es/weak-set/index.js +2 -1
  280. package/features/aggregate-error.js +2 -1
  281. package/features/composite-key.js +2 -1
  282. package/features/composite-symbol.js +2 -1
  283. package/features/dom-collections/for-each.js +1 -3
  284. package/features/dom-collections/index.js +1 -11
  285. package/features/dom-collections/iterator.js +1 -3
  286. package/features/global-this.js +1 -1
  287. package/features/instance/at.js +1 -0
  288. package/features/instance/code-points.js +1 -0
  289. package/features/instance/replace-all.js +1 -0
  290. package/features/map/delete-all.js +2 -1
  291. package/features/map/every.js +2 -1
  292. package/features/map/filter.js +2 -1
  293. package/features/map/find-key.js +2 -1
  294. package/features/map/find.js +2 -1
  295. package/features/map/from.js +3 -1
  296. package/features/map/group-by.js +3 -1
  297. package/features/map/includes.js +2 -1
  298. package/features/map/key-by.js +3 -1
  299. package/features/map/key-of.js +2 -1
  300. package/features/map/map-keys.js +2 -1
  301. package/features/map/map-values.js +2 -1
  302. package/features/map/merge.js +2 -1
  303. package/features/map/of.js +3 -1
  304. package/features/map/reduce.js +2 -1
  305. package/features/map/some.js +2 -1
  306. package/features/map/update.js +2 -1
  307. package/features/math/clamp.js +2 -1
  308. package/features/math/degrees.js +2 -1
  309. package/features/math/fscale.js +2 -1
  310. package/features/math/iaddh.js +2 -1
  311. package/features/math/imulh.js +2 -1
  312. package/features/math/isubh.js +2 -1
  313. package/features/math/radians.js +2 -1
  314. package/features/math/scale.js +2 -1
  315. package/features/math/seeded-prng.js +2 -1
  316. package/features/math/signbit.js +2 -1
  317. package/features/math/umulh.js +2 -1
  318. package/features/number/from-string.js +2 -1
  319. package/features/observable/index.js +2 -1
  320. package/features/promise/all-settled.js +3 -1
  321. package/features/promise/any.js +3 -1
  322. package/features/promise/try.js +3 -1
  323. package/features/reflect/define-metadata.js +2 -1
  324. package/features/reflect/delete-metadata.js +4 -1
  325. package/features/reflect/get-metadata-keys.js +2 -1
  326. package/features/reflect/get-metadata.js +2 -1
  327. package/features/reflect/get-own-metadata-keys.js +2 -1
  328. package/features/reflect/get-own-metadata.js +2 -1
  329. package/features/reflect/has-metadata.js +2 -1
  330. package/features/reflect/has-own-metadata.js +2 -1
  331. package/features/reflect/metadata.js +2 -1
  332. package/features/set/add-all.js +2 -1
  333. package/features/set/delete-all.js +2 -1
  334. package/features/set/difference.js +2 -1
  335. package/features/set/every.js +2 -1
  336. package/features/set/filter.js +2 -1
  337. package/features/set/find.js +2 -1
  338. package/features/set/from.js +3 -1
  339. package/features/set/intersection.js +2 -1
  340. package/features/set/is-disjoint-from.js +2 -1
  341. package/features/set/is-subset-of.js +2 -1
  342. package/features/set/is-superset-of.js +2 -1
  343. package/features/set/join.js +2 -1
  344. package/features/set/map.js +2 -1
  345. package/features/set/of.js +3 -1
  346. package/features/set/reduce.js +2 -1
  347. package/features/set/some.js +2 -1
  348. package/features/set/symmetric-difference.js +2 -1
  349. package/features/set/union.js +2 -1
  350. package/features/string/at.js +2 -1
  351. package/features/string/index.js +2 -0
  352. package/features/string/match-all.js +3 -0
  353. package/features/string/replace-all.js +2 -1
  354. package/features/string/virtual/at.js +2 -1
  355. package/features/string/virtual/index.js +2 -0
  356. package/features/string/virtual/match-all.js +3 -0
  357. package/features/string/virtual/replace-all.js +2 -1
  358. package/features/symbol/dispose.js +2 -1
  359. package/features/symbol/observable.js +2 -1
  360. package/features/symbol/pattern-match.js +2 -1
  361. package/features/symbol/replace-all.js +2 -1
  362. package/features/url/index.js +1 -5
  363. package/features/url/to-json.js +1 -1
  364. package/features/url-search-params/index.js +1 -3
  365. package/features/weak-map/delete-all.js +2 -1
  366. package/features/weak-map/from.js +3 -1
  367. package/features/weak-map/of.js +3 -1
  368. package/features/weak-set/add-all.js +2 -1
  369. package/features/weak-set/delete-all.js +2 -1
  370. package/features/weak-set/from.js +3 -1
  371. package/features/weak-set/of.js +3 -1
  372. package/internals/a-possible-prototype.js +7 -0
  373. package/internals/add-to-unscopables.js +3 -1
  374. package/internals/advance-string-index.js +2 -2
  375. package/internals/array-buffer-view-core.js +5 -3
  376. package/internals/array-buffer.js +13 -12
  377. package/internals/array-copy-within.js +3 -1
  378. package/internals/array-for-each.js +5 -7
  379. package/internals/array-from.js +1 -1
  380. package/internals/array-includes.js +12 -7
  381. package/internals/{array-methods.js → array-iteration.js} +30 -18
  382. package/internals/array-last-index-of.js +6 -4
  383. package/internals/array-method-has-species-support.js +3 -1
  384. package/internals/array-reduce.js +30 -21
  385. package/internals/array-species-create.js +3 -1
  386. package/internals/check-correctness-of-iteration.js +3 -1
  387. package/internals/classof.js +3 -1
  388. package/internals/collection-from.js +3 -2
  389. package/internals/collection-strong.js +1 -0
  390. package/internals/collection-weak.js +6 -5
  391. package/internals/collection.js +5 -5
  392. package/internals/composite-key.js +1 -0
  393. package/internals/correct-is-regexp-logic.js +3 -1
  394. package/internals/correct-prototype-getter.js +3 -1
  395. package/internals/create-html.js +1 -0
  396. package/internals/date-to-iso-string.js +12 -13
  397. package/internals/define-iterator.js +5 -3
  398. package/internals/descriptors.js +3 -1
  399. package/internals/document-create-element.js +5 -3
  400. package/internals/entry-unbind.js +1 -0
  401. package/internals/forced-object-prototype-accessors-methods.js +6 -2
  402. package/internals/forced-string-trim-method.js +1 -0
  403. package/internals/freezing.js +3 -1
  404. package/internals/function-bind.js +4 -3
  405. package/internals/function-to-string.js +3 -1
  406. package/internals/get-iterator-method.js +3 -1
  407. package/internals/hide.js +2 -1
  408. package/internals/html.js +2 -2
  409. package/internals/ie8-dom-define.js +6 -2
  410. package/internals/indexed-object.js +2 -1
  411. package/internals/inherit-if-required.js +13 -6
  412. package/internals/internal-metadata.js +6 -3
  413. package/internals/internal-state.js +3 -1
  414. package/internals/is-array-iterator-method.js +4 -2
  415. package/internals/is-forced.js +1 -0
  416. package/internals/is-integer.js +1 -0
  417. package/internals/is-iterable.js +3 -1
  418. package/internals/is-regexp.js +3 -1
  419. package/internals/iterate.js +19 -10
  420. package/internals/iterators-core.js +3 -1
  421. package/internals/math-expm1.js +2 -1
  422. package/internals/math-fround.js +3 -1
  423. package/internals/math-log1p.js +3 -1
  424. package/internals/microtask.js +1 -0
  425. package/internals/native-symbol.js +4 -2
  426. package/internals/native-url.js +5 -2
  427. package/internals/native-weak-map.js +3 -1
  428. package/internals/new-promise-capability.js +1 -1
  429. package/internals/not-a-regexp.js +7 -0
  430. package/internals/number-is-finite.js +3 -1
  431. package/internals/object-assign.js +5 -2
  432. package/internals/object-create.js +7 -3
  433. package/internals/object-define-properties.js +4 -2
  434. package/internals/object-define-property.js +3 -0
  435. package/internals/object-get-own-property-descriptor.js +3 -0
  436. package/internals/object-get-own-property-names-external.js +2 -1
  437. package/internals/object-get-own-property-names.js +5 -2
  438. package/internals/object-get-prototype-of.js +5 -2
  439. package/internals/object-keys-internal.js +2 -2
  440. package/internals/object-keys.js +2 -1
  441. package/internals/object-property-is-enumerable.js +5 -3
  442. package/internals/object-set-prototype-of.js +10 -6
  443. package/internals/object-to-array.js +25 -15
  444. package/internals/object-to-string.js +3 -1
  445. package/internals/own-keys.js +2 -2
  446. package/internals/parse-float.js +10 -6
  447. package/internals/parse-int.js +9 -5
  448. package/internals/punycode-to-ascii.js +2 -4
  449. package/internals/redefine.js +3 -1
  450. package/internals/reflect-metadata.js +5 -2
  451. package/internals/regexp-exec.js +0 -1
  452. package/internals/regexp-flags.js +1 -0
  453. package/internals/set-species.js +11 -6
  454. package/internals/set-to-string-tag.js +3 -1
  455. package/internals/shared-key.js +4 -2
  456. package/internals/shared.js +4 -2
  457. package/internals/species-constructor.js +3 -1
  458. package/internals/string-multibyte.js +27 -0
  459. package/internals/string-pad.js +25 -11
  460. package/internals/string-trim.js +23 -9
  461. package/internals/task.js +1 -0
  462. package/internals/to-absolute-index.js +1 -0
  463. package/internals/to-length.js +1 -0
  464. package/internals/to-primitive.js +8 -6
  465. package/internals/typed-array-constructor.js +98 -95
  466. package/internals/typed-arrays-constructors-requires-wrappers.js +1 -0
  467. package/internals/uid.js +1 -1
  468. package/internals/user-agent.js +2 -3
  469. package/internals/well-known-symbol.js +5 -2
  470. package/modules/es.array-buffer.constructor.js +9 -4
  471. package/modules/es.array-buffer.is-view.js +3 -1
  472. package/modules/es.array-buffer.slice.js +5 -2
  473. package/modules/es.array.concat.js +9 -4
  474. package/modules/es.array.copy-within.js +7 -3
  475. package/modules/es.array.every.js +5 -5
  476. package/modules/es.array.fill.js +8 -2
  477. package/modules/es.array.filter.js +5 -5
  478. package/modules/es.array.find-index.js +7 -4
  479. package/modules/es.array.find.js +7 -4
  480. package/modules/es.array.flat-map.js +3 -2
  481. package/modules/es.array.flat.js +3 -2
  482. package/modules/es.array.for-each.js +4 -1
  483. package/modules/es.array.from.js +7 -3
  484. package/modules/es.array.includes.js +6 -4
  485. package/modules/es.array.index-of.js +7 -4
  486. package/modules/es.array.is-array.js +6 -1
  487. package/modules/es.array.iterator.js +1 -0
  488. package/modules/es.array.join.js +7 -3
  489. package/modules/es.array.last-index-of.js +4 -3
  490. package/modules/es.array.map.js +5 -5
  491. package/modules/es.array.of.js +4 -2
  492. package/modules/es.array.reduce-right.js +5 -5
  493. package/modules/es.array.reduce.js +5 -5
  494. package/modules/es.array.reverse.js +3 -1
  495. package/modules/es.array.slice.js +6 -4
  496. package/modules/es.array.some.js +5 -5
  497. package/modules/es.array.sort.js +5 -2
  498. package/modules/es.array.species.js +3 -1
  499. package/modules/es.array.splice.js +4 -3
  500. package/modules/es.array.unscopables.flat-map.js +3 -1
  501. package/modules/es.array.unscopables.flat.js +3 -1
  502. package/modules/es.data-view.js +4 -2
  503. package/modules/es.date.now.js +3 -1
  504. package/modules/es.date.to-iso-string.js +2 -1
  505. package/modules/es.date.to-json.js +4 -2
  506. package/modules/es.date.to-primitive.js +3 -1
  507. package/modules/es.date.to-string.js +3 -1
  508. package/modules/es.function.bind.js +5 -2
  509. package/modules/es.function.has-instance.js +3 -1
  510. package/modules/es.function.name.js +1 -0
  511. package/modules/es.json.to-string-tag.js +4 -1
  512. package/modules/es.map.js +6 -3
  513. package/modules/es.math.acosh.js +3 -1
  514. package/modules/es.math.asinh.js +3 -1
  515. package/modules/es.math.atanh.js +3 -1
  516. package/modules/es.math.cbrt.js +3 -1
  517. package/modules/es.math.clz32.js +3 -1
  518. package/modules/es.math.cosh.js +3 -1
  519. package/modules/es.math.expm1.js +3 -4
  520. package/modules/es.math.fround.js +4 -1
  521. package/modules/es.math.hypot.js +3 -1
  522. package/modules/es.math.imul.js +5 -2
  523. package/modules/es.math.log10.js +3 -1
  524. package/modules/es.math.log1p.js +4 -1
  525. package/modules/es.math.log2.js +3 -1
  526. package/modules/es.math.sign.js +6 -1
  527. package/modules/es.math.sinh.js +5 -2
  528. package/modules/es.math.tanh.js +3 -1
  529. package/modules/es.math.to-string-tag.js +3 -1
  530. package/modules/es.math.trunc.js +3 -1
  531. package/modules/es.number.constructor.js +16 -13
  532. package/modules/es.number.epsilon.js +5 -1
  533. package/modules/es.number.is-finite.js +4 -3
  534. package/modules/es.number.is-integer.js +5 -2
  535. package/modules/es.number.is-nan.js +3 -1
  536. package/modules/es.number.is-safe-integer.js +3 -1
  537. package/modules/es.number.max-safe-integer.js +5 -1
  538. package/modules/es.number.min-safe-integer.js +5 -1
  539. package/modules/es.number.parse-float.js +2 -1
  540. package/modules/es.number.parse-int.js +2 -1
  541. package/modules/es.number.to-fixed.js +67 -58
  542. package/modules/es.number.to-precision.js +8 -4
  543. package/modules/es.object.assign.js +4 -1
  544. package/modules/es.object.create.js +7 -3
  545. package/modules/es.object.define-getter.js +5 -3
  546. package/modules/es.object.define-properties.js +4 -2
  547. package/modules/es.object.define-property.js +4 -2
  548. package/modules/es.object.define-setter.js +5 -3
  549. package/modules/es.object.entries.js +4 -3
  550. package/modules/es.object.freeze.js +6 -3
  551. package/modules/es.object.from-entries.js +2 -1
  552. package/modules/es.object.get-own-property-descriptor.js +5 -2
  553. package/modules/es.object.get-own-property-descriptors.js +5 -4
  554. package/modules/es.object.get-own-property-names.js +5 -2
  555. package/modules/es.object.get-prototype-of.js +5 -4
  556. package/modules/es.object.is-extensible.js +5 -2
  557. package/modules/es.object.is-frozen.js +5 -2
  558. package/modules/es.object.is-sealed.js +5 -2
  559. package/modules/es.object.is.js +6 -1
  560. package/modules/es.object.keys.js +5 -2
  561. package/modules/es.object.lookup-getter.js +5 -3
  562. package/modules/es.object.lookup-setter.js +5 -3
  563. package/modules/es.object.prevent-extensions.js +6 -3
  564. package/modules/es.object.seal.js +6 -3
  565. package/modules/es.object.set-prototype-of.js +5 -2
  566. package/modules/es.object.to-string.js +3 -1
  567. package/modules/es.object.values.js +4 -3
  568. package/modules/es.parse-float.js +2 -1
  569. package/modules/es.parse-int.js +2 -1
  570. package/modules/es.promise.finally.js +2 -1
  571. package/modules/es.promise.js +26 -17
  572. package/modules/es.reflect.apply.js +7 -3
  573. package/modules/es.reflect.construct.js +7 -4
  574. package/modules/es.reflect.define-property.js +8 -6
  575. package/modules/es.reflect.delete-property.js +3 -2
  576. package/modules/es.reflect.get-own-property-descriptor.js +4 -3
  577. package/modules/es.reflect.get-prototype-of.js +3 -2
  578. package/modules/es.reflect.get.js +7 -4
  579. package/modules/es.reflect.has.js +3 -1
  580. package/modules/es.reflect.is-extensible.js +3 -1
  581. package/modules/es.reflect.own-keys.js +6 -1
  582. package/modules/es.reflect.prevent-extensions.js +2 -1
  583. package/modules/es.reflect.set-prototype-of.js +6 -3
  584. package/modules/es.reflect.set.js +7 -4
  585. package/modules/es.regexp.constructor.js +8 -5
  586. package/modules/es.regexp.exec.js +4 -4
  587. package/modules/es.regexp.flags.js +7 -3
  588. package/modules/es.regexp.to-string.js +4 -2
  589. package/modules/es.set.js +6 -3
  590. package/modules/es.string.anchor.js +3 -2
  591. package/modules/es.string.big.js +3 -2
  592. package/modules/es.string.blink.js +3 -2
  593. package/modules/es.string.bold.js +3 -2
  594. package/modules/es.string.code-point-at.js +4 -3
  595. package/modules/es.string.ends-with.js +9 -7
  596. package/modules/es.string.fixed.js +3 -2
  597. package/modules/es.string.fontcolor.js +3 -2
  598. package/modules/es.string.fontsize.js +3 -2
  599. package/modules/es.string.from-code-point.js +3 -1
  600. package/modules/es.string.includes.js +7 -7
  601. package/modules/es.string.italics.js +3 -2
  602. package/modules/es.string.iterator.js +3 -2
  603. package/modules/es.string.link.js +3 -2
  604. package/modules/es.string.match-all.js +6 -3
  605. package/modules/es.string.match.js +32 -36
  606. package/modules/es.string.pad-end.js +4 -3
  607. package/modules/es.string.pad-start.js +4 -3
  608. package/modules/es.string.raw.js +2 -1
  609. package/modules/es.string.repeat.js +5 -2
  610. package/modules/es.string.replace.js +95 -98
  611. package/modules/es.string.search.js +25 -29
  612. package/modules/es.string.small.js +3 -2
  613. package/modules/es.string.split.js +107 -111
  614. package/modules/es.string.starts-with.js +11 -7
  615. package/modules/es.string.strike.js +3 -2
  616. package/modules/es.string.sub.js +3 -2
  617. package/modules/es.string.sup.js +3 -2
  618. package/modules/es.string.trim-end.js +7 -4
  619. package/modules/es.string.trim-start.js +7 -4
  620. package/modules/es.string.trim.js +5 -4
  621. package/modules/es.symbol.async-iterator.js +3 -1
  622. package/modules/es.symbol.description.js +7 -2
  623. package/modules/es.symbol.has-instance.js +3 -1
  624. package/modules/es.symbol.is-concat-spreadable.js +3 -1
  625. package/modules/es.symbol.iterator.js +3 -1
  626. package/modules/es.symbol.js +107 -95
  627. package/modules/es.symbol.match-all.js +3 -1
  628. package/modules/es.symbol.match.js +3 -1
  629. package/modules/es.symbol.replace.js +3 -1
  630. package/modules/es.symbol.search.js +3 -1
  631. package/modules/es.symbol.species.js +3 -1
  632. package/modules/es.symbol.split.js +3 -1
  633. package/modules/es.symbol.to-primitive.js +3 -1
  634. package/modules/es.symbol.to-string-tag.js +3 -1
  635. package/modules/es.symbol.unscopables.js +3 -1
  636. package/modules/es.typed-array.copy-within.js +3 -2
  637. package/modules/es.typed-array.every.js +3 -2
  638. package/modules/es.typed-array.fill.js +3 -2
  639. package/modules/es.typed-array.filter.js +4 -3
  640. package/modules/es.typed-array.find-index.js +3 -2
  641. package/modules/es.typed-array.find.js +3 -2
  642. package/modules/es.typed-array.float32-array.js +3 -1
  643. package/modules/es.typed-array.float64-array.js +3 -1
  644. package/modules/es.typed-array.for-each.js +3 -2
  645. package/modules/es.typed-array.includes.js +3 -2
  646. package/modules/es.typed-array.index-of.js +3 -2
  647. package/modules/es.typed-array.int16-array.js +3 -1
  648. package/modules/es.typed-array.int32-array.js +3 -1
  649. package/modules/es.typed-array.int8-array.js +3 -1
  650. package/modules/es.typed-array.iterator.js +6 -3
  651. package/modules/es.typed-array.join.js +3 -2
  652. package/modules/es.typed-array.last-index-of.js +3 -2
  653. package/modules/es.typed-array.map.js +6 -6
  654. package/modules/es.typed-array.of.js +2 -1
  655. package/modules/es.typed-array.reduce-right.js +3 -3
  656. package/modules/es.typed-array.reduce.js +3 -3
  657. package/modules/es.typed-array.reverse.js +3 -1
  658. package/modules/es.typed-array.set.js +5 -3
  659. package/modules/es.typed-array.slice.js +6 -4
  660. package/modules/es.typed-array.some.js +3 -2
  661. package/modules/es.typed-array.sort.js +3 -2
  662. package/modules/es.typed-array.subarray.js +2 -1
  663. package/modules/es.typed-array.to-locale-string.js +10 -7
  664. package/modules/es.typed-array.to-string.js +6 -3
  665. package/modules/es.typed-array.uint16-array.js +3 -1
  666. package/modules/es.typed-array.uint32-array.js +3 -1
  667. package/modules/es.typed-array.uint8-array.js +3 -1
  668. package/modules/es.typed-array.uint8-clamped-array.js +3 -1
  669. package/modules/es.weak-map.js +6 -4
  670. package/modules/es.weak-set.js +6 -3
  671. package/modules/esnext.aggregate-error.js +5 -3
  672. package/modules/esnext.array.last-index.js +2 -1
  673. package/modules/esnext.array.last-item.js +2 -1
  674. package/modules/esnext.composite-key.js +2 -1
  675. package/modules/esnext.composite-symbol.js +2 -1
  676. package/modules/esnext.global-this.js +6 -1
  677. package/modules/esnext.map.delete-all.js +3 -3
  678. package/modules/esnext.map.every.js +7 -6
  679. package/modules/esnext.map.filter.js +7 -6
  680. package/modules/esnext.map.find-key.js +7 -6
  681. package/modules/esnext.map.find.js +7 -6
  682. package/modules/esnext.map.from.js +5 -2
  683. package/modules/esnext.map.group-by.js +2 -1
  684. package/modules/esnext.map.includes.js +7 -8
  685. package/modules/esnext.map.key-by.js +2 -1
  686. package/modules/esnext.map.key-of.js +7 -8
  687. package/modules/esnext.map.map-keys.js +7 -6
  688. package/modules/esnext.map.map-values.js +7 -6
  689. package/modules/esnext.map.merge.js +3 -1
  690. package/modules/esnext.map.of.js +5 -2
  691. package/modules/esnext.map.reduce.js +8 -6
  692. package/modules/esnext.map.some.js +7 -6
  693. package/modules/esnext.map.update.js +6 -3
  694. package/modules/esnext.math.clamp.js +3 -1
  695. package/modules/esnext.math.deg-per-rad.js +5 -1
  696. package/modules/esnext.math.degrees.js +5 -3
  697. package/modules/esnext.math.fscale.js +3 -1
  698. package/modules/esnext.math.iaddh.js +3 -1
  699. package/modules/esnext.math.imulh.js +3 -1
  700. package/modules/esnext.math.isubh.js +3 -1
  701. package/modules/esnext.math.rad-per-deg.js +5 -1
  702. package/modules/esnext.math.radians.js +3 -1
  703. package/modules/esnext.math.scale.js +6 -1
  704. package/modules/esnext.math.seeded-prng.js +4 -2
  705. package/modules/esnext.math.signbit.js +8 -4
  706. package/modules/esnext.math.umulh.js +3 -1
  707. package/modules/esnext.number.from-string.js +3 -1
  708. package/modules/esnext.observable.js +33 -26
  709. package/modules/esnext.promise.all-settled.js +4 -3
  710. package/modules/esnext.promise.any.js +5 -3
  711. package/modules/esnext.promise.try.js +4 -3
  712. package/modules/esnext.reflect.define-metadata.js +3 -1
  713. package/modules/esnext.reflect.delete-metadata.js +3 -1
  714. package/modules/esnext.reflect.get-metadata-keys.js +4 -1
  715. package/modules/esnext.reflect.get-metadata.js +3 -1
  716. package/modules/esnext.reflect.get-own-metadata-keys.js +3 -1
  717. package/modules/esnext.reflect.get-own-metadata.js +3 -1
  718. package/modules/esnext.reflect.has-metadata.js +3 -1
  719. package/modules/esnext.reflect.has-own-metadata.js +3 -1
  720. package/modules/esnext.reflect.metadata.js +3 -1
  721. package/modules/esnext.set.add-all.js +3 -1
  722. package/modules/esnext.set.delete-all.js +3 -1
  723. package/modules/esnext.set.difference.js +3 -1
  724. package/modules/esnext.set.every.js +7 -5
  725. package/modules/esnext.set.filter.js +7 -5
  726. package/modules/esnext.set.find.js +7 -5
  727. package/modules/esnext.set.from.js +5 -2
  728. package/modules/esnext.set.intersection.js +3 -1
  729. package/modules/esnext.set.is-disjoint-from.js +6 -5
  730. package/modules/esnext.set.is-subset-of.js +6 -5
  731. package/modules/esnext.set.is-superset-of.js +6 -5
  732. package/modules/esnext.set.join.js +5 -3
  733. package/modules/esnext.set.map.js +7 -5
  734. package/modules/esnext.set.of.js +5 -2
  735. package/modules/esnext.set.reduce.js +8 -5
  736. package/modules/esnext.set.some.js +7 -5
  737. package/modules/esnext.set.symmetric-difference.js +3 -1
  738. package/modules/esnext.set.union.js +3 -1
  739. package/modules/esnext.string.at.js +4 -3
  740. package/modules/esnext.string.code-points.js +8 -4
  741. package/modules/esnext.string.replace-all.js +9 -6
  742. package/modules/esnext.symbol.dispose.js +3 -1
  743. package/modules/esnext.symbol.observable.js +4 -1
  744. package/modules/esnext.symbol.pattern-match.js +3 -1
  745. package/modules/esnext.symbol.replace-all.js +3 -1
  746. package/modules/esnext.weak-map.delete-all.js +3 -3
  747. package/modules/esnext.weak-map.from.js +5 -2
  748. package/modules/esnext.weak-map.of.js +5 -2
  749. package/modules/esnext.weak-set.add-all.js +3 -2
  750. package/modules/esnext.weak-set.delete-all.js +3 -2
  751. package/modules/esnext.weak-set.from.js +5 -2
  752. package/modules/esnext.weak-set.of.js +5 -2
  753. package/modules/web.dom-collections.for-each.js +1 -1
  754. package/modules/web.dom-collections.iterator.js +2 -1
  755. package/modules/web.immediate.js +6 -0
  756. package/modules/web.queue-microtask.js +9 -5
  757. package/modules/web.timers.js +15 -9
  758. package/modules/web.url-search-params.js +59 -42
  759. package/modules/web.url.js +53 -47
  760. package/modules/web.url.to-json.js +3 -1
  761. package/package.json +2 -2
  762. package/proposals/string-match-all.js +1 -0
  763. package/scripts/postinstall.js +19 -8
  764. package/stable/dom-collections/index.js +2 -1
  765. package/stable/dom-collections/iterator.js +2 -1
  766. package/web/queue-microtask.js +2 -1
  767. package/web/url-search-params.js +2 -1
  768. package/web/url.js +2 -1
  769. package/internals/enum-keys.js +0 -16
  770. package/internals/string-at.js +0 -16
  771. package/internals/validate-set-prototype-of-arguments.js +0 -9
  772. package/internals/validate-string-method-arguments.js +0 -9
@@ -1,22 +1,28 @@
1
1
  'use strict';
2
+ // TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
2
3
  require('../modules/es.string.iterator');
4
+ var $ = require('../internals/export');
3
5
  var DESCRIPTORS = require('../internals/descriptors');
4
6
  var USE_NATIVE_URL = require('../internals/native-url');
5
- var NativeURL = require('../internals/global').URL;
7
+ var global = require('../internals/global');
6
8
  var defineProperties = require('../internals/object-define-properties');
7
9
  var redefine = require('../internals/redefine');
8
10
  var anInstance = require('../internals/an-instance');
9
11
  var has = require('../internals/has');
10
12
  var assign = require('../internals/object-assign');
11
13
  var arrayFrom = require('../internals/array-from');
12
- var codePointAt = require('../internals/string-at');
14
+ var codeAt = require('../internals/string-multibyte').codeAt;
13
15
  var toASCII = require('../internals/punycode-to-ascii');
16
+ var setToStringTag = require('../internals/set-to-string-tag');
14
17
  var URLSearchParamsModule = require('../modules/web.url-search-params');
18
+ var InternalStateModule = require('../internals/internal-state');
19
+
20
+ var NativeURL = global.URL;
15
21
  var URLSearchParams = URLSearchParamsModule.URLSearchParams;
16
22
  var getInternalSearchParamsState = URLSearchParamsModule.getState;
17
- var InternalStateModule = require('../internals/internal-state');
18
23
  var setInternalState = InternalStateModule.set;
19
24
  var getInternalURLState = InternalStateModule.getterFor('URL');
25
+ var floor = Math.floor;
20
26
  var pow = Math.pow;
21
27
 
22
28
  var INVALID_AUTHORITY = 'Invalid authority';
@@ -42,7 +48,7 @@ var TAB_AND_NEW_LINE = /[\u0009\u000A\u000D]/g;
42
48
  var EOF;
43
49
 
44
50
  var parseHost = function (url, input) {
45
- var result, codePoints, i;
51
+ var result, codePoints, index;
46
52
  if (input.charAt(0) == '[') {
47
53
  if (input.charAt(input.length - 1) != ']') return INVALID_HOST;
48
54
  result = parseIPv6(input.slice(1, -1));
@@ -53,7 +59,9 @@ var parseHost = function (url, input) {
53
59
  if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;
54
60
  result = '';
55
61
  codePoints = arrayFrom(input);
56
- for (i = 0; i < codePoints.length; i++) result += percentEncode(codePoints[i], C0ControlPercentEncodeSet);
62
+ for (index = 0; index < codePoints.length; index++) {
63
+ result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);
64
+ }
57
65
  url.host = result;
58
66
  } else {
59
67
  input = toASCII(input);
@@ -66,38 +74,38 @@ var parseHost = function (url, input) {
66
74
 
67
75
  var parseIPv4 = function (input) {
68
76
  var parts = input.split('.');
69
- var partsLength, numbers, i, part, R, n, ipv4;
70
- if (parts[parts.length - 1] == '') {
71
- if (parts.length) parts.pop();
77
+ var partsLength, numbers, index, part, radix, number, ipv4;
78
+ if (parts.length && parts[parts.length - 1] == '') {
79
+ parts.pop();
72
80
  }
73
81
  partsLength = parts.length;
74
82
  if (partsLength > 4) return input;
75
83
  numbers = [];
76
- for (i = 0; i < partsLength; i++) {
77
- part = parts[i];
84
+ for (index = 0; index < partsLength; index++) {
85
+ part = parts[index];
78
86
  if (part == '') return input;
79
- R = 10;
87
+ radix = 10;
80
88
  if (part.length > 1 && part.charAt(0) == '0') {
81
- R = HEX_START.test(part) ? 16 : 8;
82
- part = part.slice(R == 8 ? 1 : 2);
89
+ radix = HEX_START.test(part) ? 16 : 8;
90
+ part = part.slice(radix == 8 ? 1 : 2);
83
91
  }
84
92
  if (part === '') {
85
- n = 0;
93
+ number = 0;
86
94
  } else {
87
- if (!(R == 10 ? DEC : R == 8 ? OCT : HEX).test(part)) return input;
88
- n = parseInt(part, R);
95
+ if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;
96
+ number = parseInt(part, radix);
89
97
  }
90
- numbers.push(n);
98
+ numbers.push(number);
91
99
  }
92
- for (i = 0; i < partsLength; i++) {
93
- n = numbers[i];
94
- if (i == partsLength - 1) {
95
- if (n >= pow(256, 5 - partsLength)) return null;
96
- } else if (n > 255) return null;
100
+ for (index = 0; index < partsLength; index++) {
101
+ number = numbers[index];
102
+ if (index == partsLength - 1) {
103
+ if (number >= pow(256, 5 - partsLength)) return null;
104
+ } else if (number > 255) return null;
97
105
  }
98
106
  ipv4 = numbers.pop();
99
- for (i = 0; i < numbers.length; i++) {
100
- ipv4 += numbers[i] * pow(256, 3 - i);
107
+ for (index = 0; index < numbers.length; index++) {
108
+ ipv4 += numbers[index] * pow(256, 3 - index);
101
109
  }
102
110
  return ipv4;
103
111
  };
@@ -184,9 +192,9 @@ var findLongestZeroSequence = function (ipv6) {
184
192
  var maxLength = 1;
185
193
  var currStart = null;
186
194
  var currLength = 0;
187
- var i = 0;
188
- for (; i < 8; i++) {
189
- if (ipv6[i] !== 0) {
195
+ var index = 0;
196
+ for (; index < 8; index++) {
197
+ if (ipv6[index] !== 0) {
190
198
  if (currLength > maxLength) {
191
199
  maxIndex = currStart;
192
200
  maxLength = currLength;
@@ -194,7 +202,7 @@ var findLongestZeroSequence = function (ipv6) {
194
202
  currStart = null;
195
203
  currLength = 0;
196
204
  } else {
197
- if (currStart === null) currStart = i;
205
+ if (currStart === null) currStart = index;
198
206
  ++currLength;
199
207
  }
200
208
  }
@@ -206,27 +214,27 @@ var findLongestZeroSequence = function (ipv6) {
206
214
  };
207
215
 
208
216
  var serializeHost = function (host) {
209
- var result, i, compress, ignore0;
217
+ var result, index, compress, ignore0;
210
218
  // ipv4
211
219
  if (typeof host == 'number') {
212
220
  result = [];
213
- for (i = 0; i < 4; i++) {
221
+ for (index = 0; index < 4; index++) {
214
222
  result.unshift(host % 256);
215
- host = Math.floor(host / 256);
223
+ host = floor(host / 256);
216
224
  } return result.join('.');
217
225
  // ipv6
218
226
  } else if (typeof host == 'object') {
219
227
  result = '';
220
228
  compress = findLongestZeroSequence(host);
221
- for (i = 0; i < 8; i++) {
222
- if (ignore0 && host[i] === 0) continue;
229
+ for (index = 0; index < 8; index++) {
230
+ if (ignore0 && host[index] === 0) continue;
223
231
  if (ignore0) ignore0 = false;
224
- if (compress === i) {
225
- result += i ? ':' : '::';
232
+ if (compress === index) {
233
+ result += index ? ':' : '::';
226
234
  ignore0 = true;
227
235
  } else {
228
- result += host[i].toString(16);
229
- if (i < 7) result += ':';
236
+ result += host[index].toString(16);
237
+ if (index < 7) result += ':';
230
238
  }
231
239
  }
232
240
  return '[' + result + ']';
@@ -245,7 +253,7 @@ var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {
245
253
  });
246
254
 
247
255
  var percentEncode = function (char, set) {
248
- var code = codePointAt(char, 0);
256
+ var code = codeAt(char, 0);
249
257
  return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char);
250
258
  };
251
259
 
@@ -369,13 +377,11 @@ var parseURL = function (url, input, stateOverride, base) {
369
377
  if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) {
370
378
  buffer += char.toLowerCase();
371
379
  } else if (char == ':') {
372
- if (stateOverride) {
373
- if (
374
- (isSpecial(url) != has(specialSchemes, buffer)) ||
375
- (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||
376
- (url.scheme == 'file' && !url.host)
377
- ) return;
378
- }
380
+ if (stateOverride && (
381
+ (isSpecial(url) != has(specialSchemes, buffer)) ||
382
+ (buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||
383
+ (url.scheme == 'file' && !url.host)
384
+ )) return;
379
385
  url.scheme = buffer;
380
386
  if (stateOverride) {
381
387
  if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;
@@ -995,8 +1001,8 @@ if (NativeURL) {
995
1001
  });
996
1002
  }
997
1003
 
998
- require('../internals/set-to-string-tag')(URLConstructor, 'URL');
1004
+ setToStringTag(URLConstructor, 'URL');
999
1005
 
1000
- require('../internals/export')({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {
1006
+ $({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {
1001
1007
  URL: URLConstructor
1002
1008
  });
@@ -1,7 +1,9 @@
1
1
  'use strict';
2
+ var $ = require('../internals/export');
3
+
2
4
  // `URL.prototype.toJSON` method
3
5
  // https://url.spec.whatwg.org/#dom-url-tojson
4
- require('../internals/export')({ target: 'URL', proto: true, enumerable: true }, {
6
+ $({ target: 'URL', proto: true, enumerable: true }, {
5
7
  toJSON: function toJSON() {
6
8
  return URL.prototype.toString.call(this);
7
9
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "core-js",
3
3
  "description": "Standard library",
4
- "version": "3.1.0",
4
+ "version": "3.1.4",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/zloirock/core-js.git"
@@ -46,6 +46,6 @@
46
46
  "shim"
47
47
  ],
48
48
  "scripts": {
49
- "postinstall": "node scripts/postinstall"
49
+ "postinstall": "node scripts/postinstall || echo \"ignore\""
50
50
  }
51
51
  }
@@ -1,3 +1,4 @@
1
1
  // TODO: Remove from `core-js@4`
2
2
  require('../modules/es.string.match-all');
3
3
  require('../modules/es.symbol.match-all');
4
+ require('../modules/esnext.string.match-all');
@@ -1,12 +1,23 @@
1
- /* eslint-disable no-console,max-len */
1
+ /* eslint-disable max-len */
2
2
  var env = process.env;
3
- var CI = !!env.CI && env.CI !== '0' && env.CI !== 'false';
3
+ var ADBLOCK = is(env.ADBLOCK);
4
+ var CI = is(env.CI);
5
+ var COLOR = is(env.npm_config_color);
4
6
  var SILENT = !!~['silent', 'error', 'warn'].indexOf(env.npm_config_loglevel);
5
7
 
6
- if (!CI && !SILENT) {
7
- console.log('\u001B[96mThank you for using core-js (\u001B[94mhttps://github.com/zloirock/core-js\u001B[96m)!\u001B[0m\n');
8
- console.log('\u001B[96mPlease consider supporting of core-js on Open Collective or Patreon:\u001B[0m');
9
- console.log('\u001B[96m> \u001B[94mhttps://opencollective.com/core-js\u001B[0m');
10
- console.log('\u001B[96m> \u001B[94mhttps://www.patreon.com/zloirock\u001B[0m\n');
11
- console.log('\u001B[96mAlso, the author of core-js (\u001B[94mhttps://github.com/zloirock\u001B[96m) is looking for a good job -)\u001B[0m\n');
8
+ function is(it) {
9
+ return !!it && it !== '0' && it !== 'false';
10
+ }
11
+
12
+ function log(it) {
13
+ // eslint-disable-next-line no-console,no-control-regex
14
+ console.log(COLOR ? it : it.replace(/\u001B\[\d+m/g, ''));
15
+ }
16
+
17
+ if (!ADBLOCK && !CI && !SILENT) {
18
+ log('\u001B[96mThank you for using core-js (\u001B[94m https://github.com/zloirock/core-js \u001B[96m) for polyfilling JavaScript standard library!\u001B[0m\n');
19
+ log('\u001B[96mThe project needs your help! Please consider supporting of core-js on Open Collective or Patreon: \u001B[0m');
20
+ log('\u001B[96m>\u001B[94m https://opencollective.com/core-js \u001B[0m');
21
+ log('\u001B[96m>\u001B[94m https://www.patreon.com/zloirock \u001B[0m\n');
22
+ log('\u001B[96mAlso, the author of core-js (\u001B[94m https://github.com/zloirock \u001B[96m) is looking for a good job -)\u001B[0m\n');
12
23
  }
@@ -1,11 +1,12 @@
1
1
  require('../../modules/web.dom-collections.for-each');
2
2
  require('../../modules/web.dom-collections.iterator');
3
3
  var ArrayIterators = require('../../modules/es.array.iterator');
4
+ var forEach = require('../../internals/array-for-each');
4
5
 
5
6
  module.exports = {
6
7
  keys: ArrayIterators.keys,
7
8
  values: ArrayIterators.values,
8
9
  entries: ArrayIterators.entries,
9
10
  iterator: ArrayIterators.values,
10
- forEach: require('../../internals/array-for-each')
11
+ forEach: forEach
11
12
  };
@@ -1,3 +1,4 @@
1
1
  require('../../modules/web.dom-collections.iterator');
2
+ var entryUnbind = require('../../internals/entry-unbind');
2
3
 
3
- module.exports = require('../../internals/entry-unbind')('Array', 'values');
4
+ module.exports = entryUnbind('Array', 'values');
@@ -1,3 +1,4 @@
1
1
  require('../modules/web.queue-microtask');
2
+ var path = require('../internals/path');
2
3
 
3
- module.exports = require('../internals/path').queueMicrotask;
4
+ module.exports = path.queueMicrotask;
@@ -1,3 +1,4 @@
1
1
  require('../modules/web.url-search-params');
2
+ var path = require('../internals/path');
2
3
 
3
- module.exports = require('../internals/path').URLSearchParams;
4
+ module.exports = path.URLSearchParams;
package/web/url.js CHANGED
@@ -1,5 +1,6 @@
1
1
  require('../modules/web.url');
2
2
  require('../modules/web.url.to-json');
3
3
  require('../modules/web.url-search-params');
4
+ var path = require('../internals/path');
4
5
 
5
- module.exports = require('../internals/path').URL;
6
+ module.exports = path.URL;
@@ -1,16 +0,0 @@
1
- var objectKeys = require('../internals/object-keys');
2
- var getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');
3
- var propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');
4
-
5
- // all enumerable object keys, includes symbols
6
- module.exports = function (it) {
7
- var result = objectKeys(it);
8
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
9
- if (getOwnPropertySymbols) {
10
- var symbols = getOwnPropertySymbols(it);
11
- var propertyIsEnumerable = propertyIsEnumerableModule.f;
12
- var i = 0;
13
- var key;
14
- while (symbols.length > i) if (propertyIsEnumerable.call(it, key = symbols[i++])) result.push(key);
15
- } return result;
16
- };
@@ -1,16 +0,0 @@
1
- var toInteger = require('../internals/to-integer');
2
- var requireObjectCoercible = require('../internals/require-object-coercible');
3
- // CONVERT_TO_STRING: true -> String#at
4
- // CONVERT_TO_STRING: false -> String#codePointAt
5
- module.exports = function (that, pos, CONVERT_TO_STRING) {
6
- var S = String(requireObjectCoercible(that));
7
- var position = toInteger(pos);
8
- var size = S.length;
9
- var first, second;
10
- if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
11
- first = S.charCodeAt(position);
12
- return first < 0xD800 || first > 0xDBFF || position + 1 === size
13
- || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
14
- ? CONVERT_TO_STRING ? S.charAt(position) : first
15
- : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
16
- };
@@ -1,9 +0,0 @@
1
- var isObject = require('../internals/is-object');
2
- var anObject = require('../internals/an-object');
3
-
4
- module.exports = function (O, proto) {
5
- anObject(O);
6
- if (!isObject(proto) && proto !== null) {
7
- throw TypeError("Can't set " + String(proto) + ' as a prototype');
8
- }
9
- };
@@ -1,9 +0,0 @@
1
- // helper for String#{startsWith, endsWith, includes}
2
- var isRegExp = require('../internals/is-regexp');
3
- var requireObjectCoercible = require('../internals/require-object-coercible');
4
-
5
- module.exports = function (that, searchString, NAME) {
6
- if (isRegExp(searchString)) {
7
- throw TypeError('String.prototype.' + NAME + " doesn't accept regex");
8
- } return String(requireObjectCoercible(that));
9
- };