core-js 3.8.1 → 3.9.1

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 (333) hide show
  1. package/LICENSE +1 -1
  2. package/es/json/stringify.js +1 -1
  3. package/es/promise/all-settled.js +2 -0
  4. package/es/promise/any.js +2 -0
  5. package/features/array/find-last-index.js +4 -0
  6. package/features/array/find-last.js +4 -0
  7. package/features/array/index.js +2 -0
  8. package/features/array/virtual/find-last-index.js +4 -0
  9. package/features/array/virtual/find-last.js +4 -0
  10. package/features/array/virtual/index.js +3 -0
  11. package/features/instance/find-last-index.js +8 -0
  12. package/features/instance/find-last.js +8 -0
  13. package/features/typed-array/find-last-index.js +1 -0
  14. package/features/typed-array/find-last.js +1 -0
  15. package/features/typed-array/index.js +4 -0
  16. package/features/typed-array/unique-by.js +2 -0
  17. package/internals/add-to-unscopables.js +1 -1
  18. package/internals/advance-string-index.js +1 -1
  19. package/internals/array-buffer-view-core.js +1 -1
  20. package/internals/array-buffer.js +6 -4
  21. package/internals/array-copy-within.js +1 -1
  22. package/internals/array-fill.js +1 -1
  23. package/internals/array-for-each.js +2 -4
  24. package/internals/array-from.js +1 -1
  25. package/internals/array-includes.js +4 -4
  26. package/internals/array-iteration-from-last.js +34 -0
  27. package/internals/array-iteration.js +7 -7
  28. package/internals/array-last-index-of.js +2 -5
  29. package/internals/array-method-is-strict.js +1 -1
  30. package/internals/array-reduce.js +2 -2
  31. package/internals/array-species-create.js +1 -1
  32. package/internals/array-unique-by.js +32 -0
  33. package/internals/async-iterator-prototype.js +1 -1
  34. package/internals/check-correctness-of-iteration.js +1 -1
  35. package/internals/collection.js +9 -5
  36. package/internals/create-html.js +1 -1
  37. package/internals/date-to-iso-string.js +1 -1
  38. package/internals/descriptors.js +1 -1
  39. package/internals/engine-is-webos-webkit.js +3 -0
  40. package/internals/fix-regexp-well-known-symbol-logic.js +1 -0
  41. package/internals/function-bind.js +2 -2
  42. package/internals/get-map-iterator.js +1 -1
  43. package/internals/get-set-iterator.js +1 -1
  44. package/internals/get-substitution.js +40 -0
  45. package/internals/global.js +2 -2
  46. package/internals/ieee754.js +2 -4
  47. package/internals/indexed-object.js +1 -1
  48. package/internals/is-array.js +1 -1
  49. package/internals/is-integer.js +1 -1
  50. package/internals/is-iterable.js +1 -1
  51. package/internals/is-regexp.js +1 -1
  52. package/internals/iterators-core.js +10 -3
  53. package/internals/math-expm1.js +1 -1
  54. package/internals/math-fround.js +2 -2
  55. package/internals/math-log1p.js +1 -1
  56. package/internals/math-scale.js +2 -2
  57. package/internals/math-sign.js +2 -2
  58. package/internals/microtask.js +3 -1
  59. package/internals/native-symbol.js +7 -3
  60. package/internals/number-is-finite.js +1 -1
  61. package/internals/number-parse-float.js +1 -1
  62. package/internals/number-parse-int.js +1 -1
  63. package/internals/{range-iterator.js → numeric-range-iterator.js} +6 -6
  64. package/internals/object-assign.js +3 -3
  65. package/internals/object-create.js +2 -2
  66. package/internals/object-define-properties.js +1 -1
  67. package/internals/object-define-property.js +1 -1
  68. package/internals/object-get-own-property-descriptor.js +1 -1
  69. package/internals/object-get-own-property-names.js +1 -1
  70. package/internals/object-get-prototype-of.js +1 -1
  71. package/internals/object-keys.js +1 -1
  72. package/internals/object-property-is-enumerable.js +1 -1
  73. package/internals/object-prototype-accessors-forced.js +1 -1
  74. package/internals/object-set-prototype-of.js +2 -2
  75. package/internals/object-to-array.js +2 -2
  76. package/internals/object-to-string.js +1 -1
  77. package/internals/regexp-exec-abstract.js +1 -1
  78. package/internals/regexp-exec.js +1 -0
  79. package/internals/regexp-flags.js +1 -1
  80. package/internals/require-object-coercible.js +1 -1
  81. package/internals/same-value-zero.js +2 -2
  82. package/internals/same-value.js +2 -2
  83. package/internals/shared.js +2 -2
  84. package/internals/species-constructor.js +1 -1
  85. package/internals/string-multibyte.js +1 -1
  86. package/internals/string-pad-webkit-bug.js +1 -1
  87. package/internals/string-pad.js +2 -2
  88. package/internals/string-punycode-to-ascii.js +1 -1
  89. package/internals/string-repeat.js +1 -1
  90. package/internals/string-trim.js +3 -3
  91. package/internals/task.js +2 -2
  92. package/internals/this-number-value.js +1 -1
  93. package/internals/to-index.js +1 -1
  94. package/internals/to-integer.js +1 -1
  95. package/internals/to-length.js +1 -1
  96. package/internals/to-object.js +1 -1
  97. package/internals/to-primitive.js +1 -1
  98. package/internals/typed-array-constructors-require-wrappers.js +1 -1
  99. package/internals/typed-array-from-species-and-list.js +11 -0
  100. package/internals/use-symbol-as-uid.js +1 -2
  101. package/internals/well-known-symbol.js +6 -3
  102. package/internals/whitespaces.js +2 -2
  103. package/modules/es.aggregate-error.js +3 -0
  104. package/modules/es.array-buffer.constructor.js +1 -1
  105. package/modules/es.array-buffer.is-view.js +1 -1
  106. package/modules/es.array-buffer.slice.js +1 -1
  107. package/modules/es.array.concat.js +3 -2
  108. package/modules/es.array.copy-within.js +2 -2
  109. package/modules/es.array.every.js +2 -4
  110. package/modules/es.array.fill.js +2 -2
  111. package/modules/es.array.filter.js +2 -5
  112. package/modules/es.array.find-index.js +3 -6
  113. package/modules/es.array.find.js +3 -6
  114. package/modules/es.array.flat-map.js +1 -1
  115. package/modules/es.array.flat.js +1 -1
  116. package/modules/es.array.for-each.js +1 -1
  117. package/modules/es.array.from.js +1 -1
  118. package/modules/es.array.includes.js +3 -6
  119. package/modules/es.array.index-of.js +2 -4
  120. package/modules/es.array.is-array.js +1 -1
  121. package/modules/es.array.iterator.js +9 -9
  122. package/modules/es.array.join.js +1 -1
  123. package/modules/es.array.last-index-of.js +1 -1
  124. package/modules/es.array.map.js +2 -5
  125. package/modules/es.array.of.js +1 -1
  126. package/modules/es.array.reduce-right.js +2 -5
  127. package/modules/es.array.reduce.js +2 -4
  128. package/modules/es.array.reverse.js +2 -2
  129. package/modules/es.array.slice.js +2 -4
  130. package/modules/es.array.some.js +2 -4
  131. package/modules/es.array.sort.js +1 -1
  132. package/modules/es.array.species.js +1 -1
  133. package/modules/es.array.splice.js +2 -4
  134. package/modules/es.array.unscopables.flat-map.js +1 -0
  135. package/modules/es.array.unscopables.flat.js +1 -0
  136. package/modules/es.data-view.js +1 -1
  137. package/modules/es.date.now.js +1 -1
  138. package/modules/es.date.to-iso-string.js +1 -1
  139. package/modules/es.date.to-json.js +2 -2
  140. package/modules/es.date.to-primitive.js +1 -1
  141. package/modules/es.date.to-string.js +2 -2
  142. package/modules/es.function.bind.js +1 -1
  143. package/modules/es.function.has-instance.js +1 -1
  144. package/modules/es.function.name.js +1 -1
  145. package/modules/es.global-this.js +1 -1
  146. package/modules/es.json.stringify.js +3 -1
  147. package/modules/es.json.to-string-tag.js +1 -1
  148. package/modules/es.map.js +1 -1
  149. package/modules/es.math.acosh.js +1 -1
  150. package/modules/es.math.asinh.js +1 -1
  151. package/modules/es.math.atanh.js +1 -1
  152. package/modules/es.math.cbrt.js +1 -1
  153. package/modules/es.math.clz32.js +1 -1
  154. package/modules/es.math.cosh.js +1 -1
  155. package/modules/es.math.expm1.js +1 -1
  156. package/modules/es.math.fround.js +1 -1
  157. package/modules/es.math.hypot.js +3 -2
  158. package/modules/es.math.imul.js +1 -1
  159. package/modules/es.math.log10.js +1 -1
  160. package/modules/es.math.log1p.js +1 -1
  161. package/modules/es.math.log2.js +1 -1
  162. package/modules/es.math.sign.js +1 -1
  163. package/modules/es.math.sinh.js +1 -1
  164. package/modules/es.math.tanh.js +1 -1
  165. package/modules/es.math.to-string-tag.js +1 -1
  166. package/modules/es.math.trunc.js +1 -1
  167. package/modules/es.number.constructor.js +2 -2
  168. package/modules/es.number.epsilon.js +1 -1
  169. package/modules/es.number.is-finite.js +1 -1
  170. package/modules/es.number.is-integer.js +1 -1
  171. package/modules/es.number.is-nan.js +2 -2
  172. package/modules/es.number.is-safe-integer.js +1 -1
  173. package/modules/es.number.max-safe-integer.js +1 -1
  174. package/modules/es.number.min-safe-integer.js +1 -1
  175. package/modules/es.number.parse-float.js +1 -1
  176. package/modules/es.number.parse-int.js +1 -1
  177. package/modules/es.number.to-fixed.js +44 -45
  178. package/modules/es.number.to-precision.js +1 -1
  179. package/modules/es.object.assign.js +1 -1
  180. package/modules/es.object.create.js +1 -1
  181. package/modules/es.object.define-getter.js +1 -1
  182. package/modules/es.object.define-properties.js +1 -1
  183. package/modules/es.object.define-property.js +1 -1
  184. package/modules/es.object.define-setter.js +1 -1
  185. package/modules/es.object.entries.js +1 -1
  186. package/modules/es.object.freeze.js +1 -1
  187. package/modules/es.object.get-own-property-descriptor.js +1 -1
  188. package/modules/es.object.get-own-property-descriptors.js +1 -1
  189. package/modules/es.object.get-own-property-names.js +1 -1
  190. package/modules/es.object.get-prototype-of.js +1 -1
  191. package/modules/es.object.is-extensible.js +1 -1
  192. package/modules/es.object.is-frozen.js +1 -1
  193. package/modules/es.object.is-sealed.js +1 -1
  194. package/modules/es.object.is.js +1 -1
  195. package/modules/es.object.keys.js +1 -1
  196. package/modules/es.object.lookup-getter.js +1 -1
  197. package/modules/es.object.lookup-setter.js +1 -1
  198. package/modules/es.object.prevent-extensions.js +1 -1
  199. package/modules/es.object.seal.js +1 -1
  200. package/modules/es.object.set-prototype-of.js +1 -1
  201. package/modules/es.object.to-string.js +1 -1
  202. package/modules/es.object.values.js +1 -1
  203. package/modules/es.parse-float.js +1 -1
  204. package/modules/es.parse-int.js +1 -1
  205. package/modules/es.promise.all-settled.js +1 -1
  206. package/modules/es.promise.any.js +1 -1
  207. package/modules/es.promise.finally.js +1 -1
  208. package/modules/es.promise.js +8 -8
  209. package/modules/es.reflect.apply.js +1 -1
  210. package/modules/es.reflect.construct.js +1 -1
  211. package/modules/es.reflect.define-property.js +2 -2
  212. package/modules/es.reflect.delete-property.js +1 -1
  213. package/modules/es.reflect.get-own-property-descriptor.js +1 -1
  214. package/modules/es.reflect.get-prototype-of.js +1 -1
  215. package/modules/es.reflect.get.js +1 -1
  216. package/modules/es.reflect.has.js +1 -1
  217. package/modules/es.reflect.is-extensible.js +1 -1
  218. package/modules/es.reflect.own-keys.js +1 -1
  219. package/modules/es.reflect.prevent-extensions.js +1 -1
  220. package/modules/es.reflect.set-prototype-of.js +1 -1
  221. package/modules/es.reflect.set.js +2 -2
  222. package/modules/es.regexp.constructor.js +2 -2
  223. package/modules/es.regexp.exec.js +2 -0
  224. package/modules/es.regexp.flags.js +1 -1
  225. package/modules/es.regexp.sticky.js +1 -0
  226. package/modules/es.regexp.test.js +2 -0
  227. package/modules/es.regexp.to-string.js +1 -1
  228. package/modules/es.set.js +1 -1
  229. package/modules/es.string.anchor.js +1 -1
  230. package/modules/es.string.big.js +1 -1
  231. package/modules/es.string.blink.js +1 -1
  232. package/modules/es.string.bold.js +1 -1
  233. package/modules/es.string.code-point-at.js +1 -1
  234. package/modules/es.string.ends-with.js +1 -1
  235. package/modules/es.string.fixed.js +1 -1
  236. package/modules/es.string.fontcolor.js +1 -1
  237. package/modules/es.string.fontsize.js +1 -1
  238. package/modules/es.string.from-code-point.js +3 -2
  239. package/modules/es.string.includes.js +1 -1
  240. package/modules/es.string.italics.js +1 -1
  241. package/modules/es.string.iterator.js +2 -2
  242. package/modules/es.string.link.js +1 -1
  243. package/modules/es.string.match-all.js +2 -2
  244. package/modules/es.string.match.js +2 -2
  245. package/modules/es.string.pad-end.js +1 -1
  246. package/modules/es.string.pad-start.js +1 -1
  247. package/modules/es.string.raw.js +1 -1
  248. package/modules/es.string.repeat.js +1 -1
  249. package/modules/es.string.replace-all.js +29 -12
  250. package/modules/es.string.replace.js +3 -40
  251. package/modules/es.string.search.js +2 -2
  252. package/modules/es.string.small.js +1 -1
  253. package/modules/es.string.split.js +4 -2
  254. package/modules/es.string.starts-with.js +1 -1
  255. package/modules/es.string.strike.js +1 -1
  256. package/modules/es.string.sub.js +1 -1
  257. package/modules/es.string.sup.js +1 -1
  258. package/modules/es.string.trim-end.js +2 -1
  259. package/modules/es.string.trim-start.js +2 -1
  260. package/modules/es.string.trim.js +1 -1
  261. package/modules/es.symbol.async-iterator.js +1 -1
  262. package/modules/es.symbol.description.js +1 -1
  263. package/modules/es.symbol.has-instance.js +1 -1
  264. package/modules/es.symbol.is-concat-spreadable.js +1 -1
  265. package/modules/es.symbol.iterator.js +1 -1
  266. package/modules/es.symbol.js +13 -13
  267. package/modules/es.symbol.match-all.js +1 -0
  268. package/modules/es.symbol.match.js +1 -1
  269. package/modules/es.symbol.replace.js +1 -1
  270. package/modules/es.symbol.search.js +1 -1
  271. package/modules/es.symbol.species.js +1 -1
  272. package/modules/es.symbol.split.js +1 -1
  273. package/modules/es.symbol.to-primitive.js +1 -1
  274. package/modules/es.symbol.to-string-tag.js +1 -1
  275. package/modules/es.symbol.unscopables.js +1 -1
  276. package/modules/es.typed-array.copy-within.js +1 -1
  277. package/modules/es.typed-array.every.js +1 -1
  278. package/modules/es.typed-array.fill.js +2 -2
  279. package/modules/es.typed-array.filter.js +3 -9
  280. package/modules/es.typed-array.find-index.js +1 -1
  281. package/modules/es.typed-array.find.js +1 -1
  282. package/modules/es.typed-array.float32-array.js +1 -1
  283. package/modules/es.typed-array.float64-array.js +1 -1
  284. package/modules/es.typed-array.for-each.js +1 -1
  285. package/modules/es.typed-array.from.js +1 -1
  286. package/modules/es.typed-array.includes.js +1 -1
  287. package/modules/es.typed-array.index-of.js +1 -1
  288. package/modules/es.typed-array.int16-array.js +1 -1
  289. package/modules/es.typed-array.int32-array.js +1 -1
  290. package/modules/es.typed-array.int8-array.js +1 -1
  291. package/modules/es.typed-array.iterator.js +4 -4
  292. package/modules/es.typed-array.join.js +2 -2
  293. package/modules/es.typed-array.last-index-of.js +2 -2
  294. package/modules/es.typed-array.map.js +1 -1
  295. package/modules/es.typed-array.of.js +1 -1
  296. package/modules/es.typed-array.reduce-right.js +1 -1
  297. package/modules/es.typed-array.reduce.js +1 -1
  298. package/modules/es.typed-array.reverse.js +1 -1
  299. package/modules/es.typed-array.set.js +2 -2
  300. package/modules/es.typed-array.slice.js +2 -2
  301. package/modules/es.typed-array.some.js +1 -1
  302. package/modules/es.typed-array.sort.js +1 -1
  303. package/modules/es.typed-array.subarray.js +1 -1
  304. package/modules/es.typed-array.to-locale-string.js +1 -1
  305. package/modules/es.typed-array.to-string.js +1 -1
  306. package/modules/es.typed-array.uint16-array.js +1 -1
  307. package/modules/es.typed-array.uint32-array.js +1 -1
  308. package/modules/es.typed-array.uint8-array.js +1 -1
  309. package/modules/es.typed-array.uint8-clamped-array.js +1 -1
  310. package/modules/es.weak-map.js +1 -1
  311. package/modules/es.weak-set.js +1 -1
  312. package/modules/esnext.array.find-last-index.js +14 -0
  313. package/modules/esnext.array.find-last.js +14 -0
  314. package/modules/esnext.array.unique-by.js +2 -28
  315. package/modules/esnext.bigint.range.js +3 -3
  316. package/modules/esnext.map.merge.js +1 -1
  317. package/modules/esnext.number.range.js +2 -2
  318. package/modules/esnext.typed-array.filter-out.js +2 -8
  319. package/modules/esnext.typed-array.find-last-index.js +12 -0
  320. package/modules/esnext.typed-array.find-last.js +12 -0
  321. package/modules/esnext.typed-array.unique-by.js +13 -0
  322. package/modules/web.timers.js +1 -1
  323. package/modules/web.url.js +9 -11
  324. package/package.json +5 -3
  325. package/postinstall.js +2 -2
  326. package/proposals/array-find-from-last.js +5 -0
  327. package/proposals/array-unique.js +1 -0
  328. package/stable/instance/entries.js +1 -1
  329. package/stable/instance/for-each.js +1 -1
  330. package/stable/instance/keys.js +1 -1
  331. package/stable/instance/values.js +1 -1
  332. package/stage/1.js +1 -0
  333. package/internals/array-method-uses-to-length.js +0 -27
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014-2020 Denis Pushkarev
1
+ Copyright (c) 2014-2021 Denis Pushkarev
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
@@ -3,7 +3,7 @@ var core = require('../../internals/path');
3
3
 
4
4
  if (!core.JSON) core.JSON = { stringify: JSON.stringify };
5
5
 
6
- // eslint-disable-next-line no-unused-vars
6
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
7
7
  module.exports = function stringify(it, replacer, space) {
8
8
  return core.JSON.stringify.apply(null, arguments);
9
9
  };
@@ -1,6 +1,8 @@
1
1
  'use strict';
2
2
  require('../../modules/es.promise');
3
3
  require('../../modules/es.promise.all-settled');
4
+ require('../../modules/es.string.iterator');
5
+ require('../../modules/web.dom-collections.iterator');
4
6
  var path = require('../../internals/path');
5
7
 
6
8
  var Promise = path.Promise;
package/es/promise/any.js CHANGED
@@ -2,6 +2,8 @@
2
2
  require('../../modules/es.aggregate-error');
3
3
  require('../../modules/es.promise');
4
4
  require('../../modules/es.promise.any');
5
+ require('../../modules/es.string.iterator');
6
+ require('../../modules/web.dom-collections.iterator');
5
7
  var path = require('../../internals/path');
6
8
 
7
9
  var Promise = path.Promise;
@@ -0,0 +1,4 @@
1
+ require('../../modules/esnext.array.find-last-index');
2
+ var entryUnbind = require('../../internals/entry-unbind');
3
+
4
+ module.exports = entryUnbind('Array', 'findLastIndex');
@@ -0,0 +1,4 @@
1
+ require('../../modules/esnext.array.find-last');
2
+ var entryUnbind = require('../../internals/entry-unbind');
3
+
4
+ module.exports = entryUnbind('Array', 'findLast');
@@ -2,6 +2,8 @@ var parent = require('../../es/array');
2
2
  require('../../modules/es.map');
3
3
  require('../../modules/esnext.array.at');
4
4
  require('../../modules/esnext.array.filter-out');
5
+ require('../../modules/esnext.array.find-last');
6
+ require('../../modules/esnext.array.find-last-index');
5
7
  require('../../modules/esnext.array.is-template-object');
6
8
  require('../../modules/esnext.array.last-item');
7
9
  require('../../modules/esnext.array.last-index');
@@ -0,0 +1,4 @@
1
+ require('../../../modules/esnext.array.find-last-index');
2
+ var entryVirtual = require('../../../internals/entry-virtual');
3
+
4
+ module.exports = entryVirtual('Array').findLastIndex;
@@ -0,0 +1,4 @@
1
+ require('../../../modules/esnext.array.find-last');
2
+ var entryVirtual = require('../../../internals/entry-virtual');
3
+
4
+ module.exports = entryVirtual('Array').findLast;
@@ -1,6 +1,9 @@
1
1
  var parent = require('../../../es/array/virtual');
2
+ require('../../../modules/es.map');
2
3
  require('../../../modules/esnext.array.at');
3
4
  require('../../../modules/esnext.array.filter-out');
5
+ require('../../../modules/esnext.array.find-last');
6
+ require('../../../modules/esnext.array.find-last-index');
4
7
  require('../../../modules/esnext.array.unique-by');
5
8
 
6
9
  module.exports = parent;
@@ -0,0 +1,8 @@
1
+ var findLastIndex = require('../array/virtual/find-last-index');
2
+
3
+ var ArrayPrototype = Array.prototype;
4
+
5
+ module.exports = function (it) {
6
+ var own = it.findLastIndex;
7
+ return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.findLastIndex) ? findLastIndex : own;
8
+ };
@@ -0,0 +1,8 @@
1
+ var findLast = require('../array/virtual/find-last');
2
+
3
+ var ArrayPrototype = Array.prototype;
4
+
5
+ module.exports = function (it) {
6
+ var own = it.findLast;
7
+ return it === ArrayPrototype || (it instanceof Array && own === ArrayPrototype.findLast) ? findLast : own;
8
+ };
@@ -0,0 +1 @@
1
+ require('../../modules/esnext.typed-array.find-last-index');
@@ -0,0 +1 @@
1
+ require('../../modules/esnext.typed-array.find-last');
@@ -1,5 +1,9 @@
1
1
  var parent = require('../../es/typed-array');
2
+ require('../../modules/es.map');
2
3
  require('../../modules/esnext.typed-array.at');
3
4
  require('../../modules/esnext.typed-array.filter-out');
5
+ require('../../modules/esnext.typed-array.find-last');
6
+ require('../../modules/esnext.typed-array.find-last-index');
7
+ require('../../modules/esnext.typed-array.unique-by');
4
8
 
5
9
  module.exports = parent;
@@ -0,0 +1,2 @@
1
+ require('../../modules/es.map');
2
+ require('../../modules/esnext.typed-array.unique-by');
@@ -6,7 +6,7 @@ var UNSCOPABLES = wellKnownSymbol('unscopables');
6
6
  var ArrayPrototype = Array.prototype;
7
7
 
8
8
  // Array.prototype[@@unscopables]
9
- // https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
9
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
10
10
  if (ArrayPrototype[UNSCOPABLES] == undefined) {
11
11
  definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
12
12
  configurable: true,
@@ -2,7 +2,7 @@
2
2
  var charAt = require('../internals/string-multibyte').charAt;
3
3
 
4
4
  // `AdvanceStringIndex` abstract operation
5
- // https://tc39.github.io/ecma262/#sec-advancestringindex
5
+ // https://tc39.es/ecma262/#sec-advancestringindex
6
6
  module.exports = function (S, index, unicode) {
7
7
  return index + (unicode ? charAt(S, index).length : 1);
8
8
  };
@@ -122,7 +122,7 @@ for (NAME in TypedArrayConstructorsList) {
122
122
 
123
123
  // WebKit bug - typed arrays constructors prototype is Object.prototype
124
124
  if (!NATIVE_ARRAY_BUFFER_VIEWS || typeof TypedArray != 'function' || TypedArray === Function.prototype) {
125
- // eslint-disable-next-line no-shadow
125
+ // eslint-disable-next-line no-shadow -- safe
126
126
  TypedArray = function TypedArray() {
127
127
  throw TypeError('Incorrect invocation');
128
128
  };
@@ -174,16 +174,18 @@ if (!NATIVE_ARRAY_BUFFER) {
174
174
  }
175
175
  });
176
176
  } else {
177
+ /* eslint-disable no-new -- required for testing */
177
178
  if (!fails(function () {
178
179
  NativeArrayBuffer(1);
179
180
  }) || !fails(function () {
180
- new NativeArrayBuffer(-1); // eslint-disable-line no-new
181
+ new NativeArrayBuffer(-1);
181
182
  }) || fails(function () {
182
- new NativeArrayBuffer(); // eslint-disable-line no-new
183
- new NativeArrayBuffer(1.5); // eslint-disable-line no-new
184
- new NativeArrayBuffer(NaN); // eslint-disable-line no-new
183
+ new NativeArrayBuffer();
184
+ new NativeArrayBuffer(1.5);
185
+ new NativeArrayBuffer(NaN);
185
186
  return NativeArrayBuffer.name != ARRAY_BUFFER;
186
187
  })) {
188
+ /* eslint-enable no-new -- required for testing */
187
189
  $ArrayBuffer = function ArrayBuffer(length) {
188
190
  anInstance(this, $ArrayBuffer);
189
191
  return new NativeArrayBuffer(toIndex(length));
@@ -6,7 +6,7 @@ var toLength = require('../internals/to-length');
6
6
  var min = Math.min;
7
7
 
8
8
  // `Array.prototype.copyWithin` method implementation
9
- // https://tc39.github.io/ecma262/#sec-array.prototype.copywithin
9
+ // https://tc39.es/ecma262/#sec-array.prototype.copywithin
10
10
  module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
11
11
  var O = toObject(this);
12
12
  var len = toLength(O.length);
@@ -4,7 +4,7 @@ var toAbsoluteIndex = require('../internals/to-absolute-index');
4
4
  var toLength = require('../internals/to-length');
5
5
 
6
6
  // `Array.prototype.fill` method implementation
7
- // https://tc39.github.io/ecma262/#sec-array.prototype.fill
7
+ // https://tc39.es/ecma262/#sec-array.prototype.fill
8
8
  module.exports = function fill(value /* , start = 0, end = @length */) {
9
9
  var O = toObject(this);
10
10
  var length = toLength(O.length);
@@ -1,13 +1,11 @@
1
1
  'use strict';
2
2
  var $forEach = require('../internals/array-iteration').forEach;
3
3
  var arrayMethodIsStrict = require('../internals/array-method-is-strict');
4
- var arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');
5
4
 
6
5
  var STRICT_METHOD = arrayMethodIsStrict('forEach');
7
- var USES_TO_LENGTH = arrayMethodUsesToLength('forEach');
8
6
 
9
7
  // `Array.prototype.forEach` method implementation
10
- // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
11
- module.exports = (!STRICT_METHOD || !USES_TO_LENGTH) ? function forEach(callbackfn /* , thisArg */) {
8
+ // https://tc39.es/ecma262/#sec-array.prototype.foreach
9
+ module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
12
10
  return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
13
11
  } : [].forEach;
@@ -8,7 +8,7 @@ var createProperty = require('../internals/create-property');
8
8
  var getIteratorMethod = require('../internals/get-iterator-method');
9
9
 
10
10
  // `Array.from` method implementation
11
- // https://tc39.github.io/ecma262/#sec-array.from
11
+ // https://tc39.es/ecma262/#sec-array.from
12
12
  module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
13
13
  var O = toObject(arrayLike);
14
14
  var C = typeof this == 'function' ? this : Array;
@@ -10,10 +10,10 @@ var createMethod = function (IS_INCLUDES) {
10
10
  var index = toAbsoluteIndex(fromIndex, length);
11
11
  var value;
12
12
  // Array#includes uses SameValueZero equality algorithm
13
- // eslint-disable-next-line no-self-compare
13
+ // eslint-disable-next-line no-self-compare -- NaN check
14
14
  if (IS_INCLUDES && el != el) while (length > index) {
15
15
  value = O[index++];
16
- // eslint-disable-next-line no-self-compare
16
+ // eslint-disable-next-line no-self-compare -- NaN check
17
17
  if (value != value) return true;
18
18
  // Array#indexOf ignores holes, Array#includes - not
19
19
  } else for (;length > index; index++) {
@@ -24,9 +24,9 @@ var createMethod = function (IS_INCLUDES) {
24
24
 
25
25
  module.exports = {
26
26
  // `Array.prototype.includes` method
27
- // https://tc39.github.io/ecma262/#sec-array.prototype.includes
27
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
28
28
  includes: createMethod(true),
29
29
  // `Array.prototype.indexOf` method
30
- // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
30
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
31
31
  indexOf: createMethod(false)
32
32
  };
@@ -0,0 +1,34 @@
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
+
6
+ // `Array.prototype.{ findLast, findLastIndex }` methods implementation
7
+ var createMethod = function (TYPE) {
8
+ var IS_FIND_INDEX = TYPE == 6;
9
+ return function ($this, callbackfn, that) {
10
+ var O = toObject($this);
11
+ var self = IndexedObject(O);
12
+ var boundFunction = bind(callbackfn, that, 3);
13
+ var index = toLength(self.length);
14
+ var value, result;
15
+ while (index-- > 0) {
16
+ value = self[index];
17
+ result = boundFunction(value, index, O);
18
+ if (result) switch (TYPE) {
19
+ case 5: return value; // find
20
+ case 6: return index; // findIndex
21
+ }
22
+ }
23
+ return IS_FIND_INDEX ? -1 : undefined;
24
+ };
25
+ };
26
+
27
+ module.exports = {
28
+ // `Array.prototype.findLast` method
29
+ // https://github.com/tc39/proposal-array-find-from-last
30
+ findLast: createMethod(5),
31
+ // `Array.prototype.findLastIndex` method
32
+ // https://github.com/tc39/proposal-array-find-from-last
33
+ findLastIndex: createMethod(6)
34
+ };
@@ -46,25 +46,25 @@ var createMethod = function (TYPE) {
46
46
 
47
47
  module.exports = {
48
48
  // `Array.prototype.forEach` method
49
- // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
49
+ // https://tc39.es/ecma262/#sec-array.prototype.foreach
50
50
  forEach: createMethod(0),
51
51
  // `Array.prototype.map` method
52
- // https://tc39.github.io/ecma262/#sec-array.prototype.map
52
+ // https://tc39.es/ecma262/#sec-array.prototype.map
53
53
  map: createMethod(1),
54
54
  // `Array.prototype.filter` method
55
- // https://tc39.github.io/ecma262/#sec-array.prototype.filter
55
+ // https://tc39.es/ecma262/#sec-array.prototype.filter
56
56
  filter: createMethod(2),
57
57
  // `Array.prototype.some` method
58
- // https://tc39.github.io/ecma262/#sec-array.prototype.some
58
+ // https://tc39.es/ecma262/#sec-array.prototype.some
59
59
  some: createMethod(3),
60
60
  // `Array.prototype.every` method
61
- // https://tc39.github.io/ecma262/#sec-array.prototype.every
61
+ // https://tc39.es/ecma262/#sec-array.prototype.every
62
62
  every: createMethod(4),
63
63
  // `Array.prototype.find` method
64
- // https://tc39.github.io/ecma262/#sec-array.prototype.find
64
+ // https://tc39.es/ecma262/#sec-array.prototype.find
65
65
  find: createMethod(5),
66
66
  // `Array.prototype.findIndex` method
67
- // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
67
+ // https://tc39.es/ecma262/#sec-array.prototype.findIndex
68
68
  findIndex: createMethod(6),
69
69
  // `Array.prototype.filterOut` method
70
70
  // https://github.com/tc39/proposal-array-filtering
@@ -3,18 +3,15 @@ var toIndexedObject = require('../internals/to-indexed-object');
3
3
  var toInteger = require('../internals/to-integer');
4
4
  var toLength = require('../internals/to-length');
5
5
  var arrayMethodIsStrict = require('../internals/array-method-is-strict');
6
- var arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');
7
6
 
8
7
  var min = Math.min;
9
8
  var nativeLastIndexOf = [].lastIndexOf;
10
9
  var NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
11
10
  var STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');
12
- // For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method
13
- var USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
14
- var FORCED = NEGATIVE_ZERO || !STRICT_METHOD || !USES_TO_LENGTH;
11
+ var FORCED = NEGATIVE_ZERO || !STRICT_METHOD;
15
12
 
16
13
  // `Array.prototype.lastIndexOf` method implementation
17
- // https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof
14
+ // https://tc39.es/ecma262/#sec-array.prototype.lastindexof
18
15
  module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
19
16
  // convert -0 to +0
20
17
  if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0;
@@ -4,7 +4,7 @@ var fails = require('../internals/fails');
4
4
  module.exports = function (METHOD_NAME, argument) {
5
5
  var method = [][METHOD_NAME];
6
6
  return !!method && fails(function () {
7
- // eslint-disable-next-line no-useless-call,no-throw-literal
7
+ // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
8
8
  method.call(null, argument || function () { throw 1; }, 1);
9
9
  });
10
10
  };
@@ -32,9 +32,9 @@ var createMethod = function (IS_RIGHT) {
32
32
 
33
33
  module.exports = {
34
34
  // `Array.prototype.reduce` method
35
- // https://tc39.github.io/ecma262/#sec-array.prototype.reduce
35
+ // https://tc39.es/ecma262/#sec-array.prototype.reduce
36
36
  left: createMethod(false),
37
37
  // `Array.prototype.reduceRight` method
38
- // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
38
+ // https://tc39.es/ecma262/#sec-array.prototype.reduceright
39
39
  right: createMethod(true)
40
40
  };
@@ -5,7 +5,7 @@ var wellKnownSymbol = require('../internals/well-known-symbol');
5
5
  var SPECIES = wellKnownSymbol('species');
6
6
 
7
7
  // `ArraySpeciesCreate` abstract operation
8
- // https://tc39.github.io/ecma262/#sec-arrayspeciescreate
8
+ // https://tc39.es/ecma262/#sec-arrayspeciescreate
9
9
  module.exports = function (originalArray, length) {
10
10
  var C;
11
11
  if (isArray(originalArray)) {
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+ var toLength = require('../internals/to-length');
3
+ var toObject = require('../internals/to-object');
4
+ var getBuiltIn = require('../internals/get-built-in');
5
+ var arraySpeciesCreate = require('../internals/array-species-create');
6
+
7
+ var push = [].push;
8
+
9
+ // `Array.prototype.uniqueBy` method
10
+ // https://github.com/tc39/proposal-array-unique
11
+ module.exports = function uniqueBy(resolver) {
12
+ var that = toObject(this);
13
+ var length = toLength(that.length);
14
+ var result = arraySpeciesCreate(that, 0);
15
+ var Map = getBuiltIn('Map');
16
+ var map = new Map();
17
+ var resolverFunction, index, item, key;
18
+ if (typeof resolver == 'function') resolverFunction = resolver;
19
+ else if (resolver == null) resolverFunction = function (value) {
20
+ return value;
21
+ };
22
+ else throw new TypeError('Incorrect resolver!');
23
+ for (index = 0; index < length; index++) {
24
+ item = that[index];
25
+ key = resolverFunction(item);
26
+ if (!map.has(key)) map.set(key, item);
27
+ }
28
+ map.forEach(function (value) {
29
+ push.call(result, value);
30
+ });
31
+ return result;
32
+ };
@@ -19,7 +19,7 @@ if (!IS_PURE) {
19
19
  AsyncIteratorPrototype = AsyncIterator.prototype;
20
20
  } else if (shared[USE_FUNCTION_CONSTRUCTOR] || global[USE_FUNCTION_CONSTRUCTOR]) {
21
21
  try {
22
- // eslint-disable-next-line no-new-func
22
+ // eslint-disable-next-line no-new-func -- we have no alternatives without usage of modern syntax
23
23
  prototype = getPrototypeOf(getPrototypeOf(getPrototypeOf(Function('return async function*(){}()')())));
24
24
  if (getPrototypeOf(prototype) === Object.prototype) AsyncIteratorPrototype = prototype;
25
25
  } catch (error) { /* empty */ }
@@ -16,7 +16,7 @@ try {
16
16
  iteratorWithReturn[ITERATOR] = function () {
17
17
  return this;
18
18
  };
19
- // eslint-disable-next-line no-throw-literal
19
+ // eslint-disable-next-line no-throw-literal -- required for testing
20
20
  Array.from(iteratorWithReturn, function () { throw 2; });
21
21
  } catch (error) { /* empty */ }
22
22
 
@@ -40,10 +40,14 @@ module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
40
40
  );
41
41
  };
42
42
 
43
- // eslint-disable-next-line max-len
44
- if (isForced(CONSTRUCTOR_NAME, typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
45
- new NativeConstructor().entries().next();
46
- })))) {
43
+ var REPLACE = isForced(
44
+ CONSTRUCTOR_NAME,
45
+ typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
46
+ new NativeConstructor().entries().next();
47
+ }))
48
+ );
49
+
50
+ if (REPLACE) {
47
51
  // create collection constructor
48
52
  Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
49
53
  InternalMetadataModule.REQUIRED = true;
@@ -54,7 +58,7 @@ module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
54
58
  // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
55
59
  var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
56
60
  // most early implementations doesn't supports iterables, most modern - not close it correctly
57
- // eslint-disable-next-line no-new
61
+ // eslint-disable-next-line no-new -- required for testing
58
62
  var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });
59
63
  // for early implementations -0 and +0 not the same
60
64
  var BUGGY_ZERO = !IS_WEAK && fails(function () {
@@ -3,7 +3,7 @@ var requireObjectCoercible = require('../internals/require-object-coercible');
3
3
  var quot = /"/g;
4
4
 
5
5
  // B.2.3.2.1 CreateHTML(string, tag, attribute, value)
6
- // https://tc39.github.io/ecma262/#sec-createhtml
6
+ // https://tc39.es/ecma262/#sec-createhtml
7
7
  module.exports = function (string, tag, attribute, value) {
8
8
  var S = String(requireObjectCoercible(string));
9
9
  var p1 = '<' + tag;
@@ -8,7 +8,7 @@ var getTime = DatePrototype.getTime;
8
8
  var nativeDateToISOString = DatePrototype.toISOString;
9
9
 
10
10
  // `Date.prototype.toISOString` method implementation
11
- // https://tc39.github.io/ecma262/#sec-date.prototype.toisostring
11
+ // https://tc39.es/ecma262/#sec-date.prototype.toisostring
12
12
  // PhantomJS / old WebKit fails here:
13
13
  module.exports = (fails(function () {
14
14
  return nativeDateToISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';
@@ -1,6 +1,6 @@
1
1
  var fails = require('../internals/fails');
2
2
 
3
- // Thank's IE8 for his funny defineProperty
3
+ // Detect IE8's incomplete defineProperty implementation
4
4
  module.exports = !fails(function () {
5
5
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
6
6
  });
@@ -0,0 +1,3 @@
1
+ var userAgent = require('../internals/engine-user-agent');
2
+
3
+ module.exports = /web0s(?!.*chrome)/i.test(userAgent);
@@ -40,6 +40,7 @@ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
40
40
  // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
41
41
  // Weex JS has frozen built-in prototypes, so use try / catch wrapper
42
42
  var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
43
+ // eslint-disable-next-line regexp/no-empty-group -- required for testing
43
44
  var re = /(?:)/;
44
45
  var originalExec = re.exec;
45
46
  re.exec = function () { return originalExec.apply(this, arguments); };
@@ -8,13 +8,13 @@ var factories = {};
8
8
  var construct = function (C, argsLength, args) {
9
9
  if (!(argsLength in factories)) {
10
10
  for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
11
- // eslint-disable-next-line no-new-func
11
+ // eslint-disable-next-line no-new-func -- we have no proper alternatives, IE8- only
12
12
  factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');
13
13
  } return factories[argsLength](C, args);
14
14
  };
15
15
 
16
16
  // `Function.prototype.bind` method implementation
17
- // https://tc39.github.io/ecma262/#sec-function.prototype.bind
17
+ // https://tc39.es/ecma262/#sec-function.prototype.bind
18
18
  module.exports = Function.bind || function bind(that /* , ...args */) {
19
19
  var fn = aFunction(this);
20
20
  var partArgs = slice.call(arguments, 1);
@@ -2,6 +2,6 @@ var IS_PURE = require('../internals/is-pure');
2
2
  var getIterator = require('../internals/get-iterator');
3
3
 
4
4
  module.exports = IS_PURE ? getIterator : function (it) {
5
- // eslint-disable-next-line no-undef
5
+ // eslint-disable-next-line no-undef -- safe
6
6
  return Map.prototype.entries.call(it);
7
7
  };
@@ -2,6 +2,6 @@ var IS_PURE = require('../internals/is-pure');
2
2
  var getIterator = require('../internals/get-iterator');
3
3
 
4
4
  module.exports = IS_PURE ? getIterator : function (it) {
5
- // eslint-disable-next-line no-undef
5
+ // eslint-disable-next-line no-undef -- safe
6
6
  return Set.prototype.values.call(it);
7
7
  };
@@ -0,0 +1,40 @@
1
+ var toObject = require('../internals/to-object');
2
+
3
+ var floor = Math.floor;
4
+ var replace = ''.replace;
5
+ var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
6
+ var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
7
+
8
+ // https://tc39.es/ecma262/#sec-getsubstitution
9
+ module.exports = function (matched, str, position, captures, namedCaptures, replacement) {
10
+ var tailPos = position + matched.length;
11
+ var m = captures.length;
12
+ var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
13
+ if (namedCaptures !== undefined) {
14
+ namedCaptures = toObject(namedCaptures);
15
+ symbols = SUBSTITUTION_SYMBOLS;
16
+ }
17
+ return replace.call(replacement, symbols, function (match, ch) {
18
+ var capture;
19
+ switch (ch.charAt(0)) {
20
+ case '$': return '$';
21
+ case '&': return matched;
22
+ case '`': return str.slice(0, position);
23
+ case "'": return str.slice(tailPos);
24
+ case '<':
25
+ capture = namedCaptures[ch.slice(1, -1)];
26
+ break;
27
+ default: // \d\d?
28
+ var n = +ch;
29
+ if (n === 0) return match;
30
+ if (n > m) {
31
+ var f = floor(n / 10);
32
+ if (f === 0) return match;
33
+ if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
34
+ return match;
35
+ }
36
+ capture = captures[n - 1];
37
+ }
38
+ return capture === undefined ? '' : capture;
39
+ });
40
+ };
@@ -4,10 +4,10 @@ var check = function (it) {
4
4
 
5
5
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
6
6
  module.exports =
7
- // eslint-disable-next-line no-undef
7
+ /* global globalThis -- safe */
8
8
  check(typeof globalThis == 'object' && globalThis) ||
9
9
  check(typeof window == 'object' && window) ||
10
10
  check(typeof self == 'object' && self) ||
11
11
  check(typeof global == 'object' && global) ||
12
- // eslint-disable-next-line no-new-func
12
+ // eslint-disable-next-line no-new-func -- fallback
13
13
  (function () { return this; })() || Function('return this')();
@@ -1,6 +1,4 @@
1
1
  // IEEE754 conversions based on https://github.com/feross/ieee754
2
- // eslint-disable-next-line no-shadow-restricted-names
3
- var Infinity = 1 / 0;
4
2
  var abs = Math.abs;
5
3
  var pow = Math.pow;
6
4
  var floor = Math.floor;
@@ -17,9 +15,9 @@ var pack = function (number, mantissaLength, bytes) {
17
15
  var index = 0;
18
16
  var exponent, mantissa, c;
19
17
  number = abs(number);
20
- // eslint-disable-next-line no-self-compare
18
+ // eslint-disable-next-line no-self-compare -- NaN check
21
19
  if (number != number || number === Infinity) {
22
- // eslint-disable-next-line no-self-compare
20
+ // eslint-disable-next-line no-self-compare -- NaN check
23
21
  mantissa = number != number ? 1 : 0;
24
22
  exponent = eMax;
25
23
  } else {
@@ -6,7 +6,7 @@ var split = ''.split;
6
6
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
7
7
  module.exports = fails(function () {
8
8
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
9
- // eslint-disable-next-line no-prototype-builtins
9
+ // eslint-disable-next-line no-prototype-builtins -- safe
10
10
  return !Object('z').propertyIsEnumerable(0);
11
11
  }) ? function (it) {
12
12
  return classof(it) == 'String' ? split.call(it, '') : Object(it);