built-in-features.js 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. // https://github.com/zloirock/core-js
  2. const typedArrayMethods = [
  3. "typed arrays / %TypedArray%.from",
  4. "typed arrays / %TypedArray%.of",
  5. "typed arrays / %TypedArray%.prototype.subarray",
  6. "typed arrays / %TypedArray%.prototype.join",
  7. "typed arrays / %TypedArray%.prototype.indexOf",
  8. "typed arrays / %TypedArray%.prototype.lastIndexOf",
  9. "typed arrays / %TypedArray%.prototype.slice",
  10. "typed arrays / %TypedArray%.prototype.every",
  11. "typed arrays / %TypedArray%.prototype.filter",
  12. "typed arrays / %TypedArray%.prototype.forEach",
  13. "typed arrays / %TypedArray%.prototype.map",
  14. "typed arrays / %TypedArray%.prototype.reduce",
  15. "typed arrays / %TypedArray%.prototype.reduceRight",
  16. "typed arrays / %TypedArray%.prototype.reverse",
  17. "typed arrays / %TypedArray%.prototype.some",
  18. "typed arrays / %TypedArray%.prototype.sort",
  19. "typed arrays / %TypedArray%.prototype.copyWithin",
  20. "typed arrays / %TypedArray%.prototype.find",
  21. "typed arrays / %TypedArray%.prototype.findIndex",
  22. "typed arrays / %TypedArray%.prototype.fill",
  23. "typed arrays / %TypedArray%.prototype.keys",
  24. "typed arrays / %TypedArray%.prototype.values",
  25. "typed arrays / %TypedArray%.prototype.entries",
  26. "typed arrays / %TypedArray%.prototype[Symbol.iterator]",
  27. "typed arrays / %TypedArray%[Symbol.species]",
  28. ];
  29. const es2015 = {
  30. "es6.typed.array-buffer": "typed arrays / ArrayBuffer[Symbol.species]",
  31. "es6.typed.data-view": "typed arrays / DataView",
  32. "es6.typed.int8-array": {
  33. features: ["typed arrays / Int8Array"].concat(typedArrayMethods)
  34. },
  35. "es6.typed.uint8-array": {
  36. features: ["typed arrays / Uint8Array"].concat(typedArrayMethods)
  37. },
  38. "es6.typed.uint8-clamped-array": {
  39. features: ["typed arrays / Uint8ClampedArray"].concat(typedArrayMethods)
  40. },
  41. "es6.typed.int16-array": {
  42. features: ["typed arrays / Int16Array"].concat(typedArrayMethods)
  43. },
  44. "es6.typed.uint16-array": {
  45. features: ["typed arrays / Uint16Array"].concat(typedArrayMethods)
  46. },
  47. "es6.typed.int32-array": {
  48. features: ["typed arrays / Int32Array"].concat(typedArrayMethods)
  49. },
  50. "es6.typed.uint32-array": {
  51. features: ["typed arrays / Uint32Array"].concat(typedArrayMethods)
  52. },
  53. "es6.typed.float32-array": {
  54. features: ["typed arrays / Float32Array"].concat(typedArrayMethods)
  55. },
  56. "es6.typed.float64-array": {
  57. features: ["typed arrays / Float64Array"].concat(typedArrayMethods)
  58. },
  59. "es6.map": "Map",
  60. "es6.set": "Set",
  61. "es6.weak-map": "WeakMap",
  62. "es6.weak-set": "WeakSet",
  63. // Proxy not implementable
  64. "es6.reflect.apply": "Reflect / Reflect.apply",
  65. "es6.reflect.construct": "Reflect / Reflect.construct",
  66. "es6.reflect.define-property": "Reflect / Reflect.defineProperty",
  67. "es6.reflect.delete-property": "Reflect / Reflect.deleteProperty",
  68. "es6.reflect.get": "Reflect / Reflect.get",
  69. "es6.reflect.get-own-property-descriptor": "Reflect / Reflect.getOwnPropertyDescriptor",
  70. "es6.reflect.get-prototype-of": "Reflect / Reflect.getPrototypeOf",
  71. "es6.reflect.has": "Reflect / Reflect.has",
  72. "es6.reflect.is-extensible": "Reflect / Reflect.isExtensible",
  73. "es6.reflect.own-keys": "Reflect / Reflect.ownKeys",
  74. "es6.reflect.prevent-extensions": "Reflect / Reflect.preventExtensions",
  75. "es6.reflect.set": "Reflect / Reflect.set",
  76. "es6.reflect.set-prototype-of": "Reflect / Reflect.setPrototypeOf",
  77. "es6.promise": "Promise",
  78. "es6.symbol": {
  79. features: [
  80. "Symbol",
  81. "Object static methods / Object.getOwnPropertySymbols",
  82. "well-known symbols / Symbol.hasInstance",
  83. "well-known symbols / Symbol.isConcatSpreadable",
  84. "well-known symbols / Symbol.iterator",
  85. "well-known symbols / Symbol.match",
  86. "well-known symbols / Symbol.replace",
  87. "well-known symbols / Symbol.search",
  88. "well-known symbols / Symbol.species",
  89. "well-known symbols / Symbol.split",
  90. "well-known symbols / Symbol.toPrimitive",
  91. "well-known symbols / Symbol.toStringTag",
  92. "well-known symbols / Symbol.unscopables",
  93. ]
  94. },
  95. "es6.object.freeze": "Object static methods accept primitives / Object.freeze",
  96. "es6.object.seal": "Object static methods accept primitives / Object.seal",
  97. "es6.object.prevent-extensions": "Object static methods accept primitives / Object.preventExtensions",
  98. "es6.object.is-frozen": "Object static methods accept primitives / Object.isFrozen",
  99. "es6.object.is-sealed": "Object static methods accept primitives / Object.isSealed",
  100. "es6.object.is-extensible": "Object static methods accept primitives / Object.isExtensible",
  101. "es6.object.get-own-property-descriptor":
  102. "Object static methods accept primitives / Object.getOwnPropertyDescriptor",
  103. "es6.object.get-prototype-of": "Object static methods accept primitives / Object.getPrototypeOf",
  104. "es6.object.keys": "Object static methods accept primitives / Object.keys",
  105. "es6.object.get-own-property-names": "Object static methods accept primitives / Object.getOwnPropertyNames",
  106. "es6.object.assign": "Object static methods / Object.assign",
  107. "es6.object.is": "Object static methods / Object.is",
  108. "es6.object.set-prototype-of": "Object static methods / Object.setPrototypeOf",
  109. "es6.function.name": "function \"name\" property",
  110. "es6.string.raw": "String static methods / String.raw",
  111. "es6.string.from-code-point": "String static methods / String.fromCodePoint",
  112. "es6.string.code-point-at": "String.prototype methods / String.prototype.codePointAt",
  113. // "String.prototype methods / String.prototype.normalize" not implemented
  114. "es6.string.repeat": "String.prototype methods / String.prototype.repeat",
  115. "es6.string.starts-with": "String.prototype methods / String.prototype.startsWith",
  116. "es6.string.ends-with": "String.prototype methods / String.prototype.endsWith",
  117. "es6.string.includes": "String.prototype methods / String.prototype.includes",
  118. "es6.regexp.flags": "RegExp.prototype properties / RegExp.prototype.flags",
  119. "es6.regexp.match": "RegExp.prototype properties / RegExp.prototype[Symbol.match]",
  120. "es6.regexp.replace": "RegExp.prototype properties / RegExp.prototype[Symbol.replace]",
  121. "es6.regexp.split": "RegExp.prototype properties / RegExp.prototype[Symbol.split]",
  122. "es6.regexp.search": "RegExp.prototype properties / RegExp.prototype[Symbol.search]",
  123. "es6.array.from": "Array static methods / Array.from",
  124. "es6.array.of": "Array static methods / Array.of",
  125. "es6.array.copy-within": "Array.prototype methods / Array.prototype.copyWithin",
  126. "es6.array.find": "Array.prototype methods / Array.prototype.find",
  127. "es6.array.find-index": "Array.prototype methods / Array.prototype.findIndex",
  128. "es6.array.fill": "Array.prototype methods / Array.prototype.fill",
  129. "es6.array.iterator": {
  130. features: [
  131. "Array.prototype methods / Array.prototype.keys",
  132. // can use Symbol.iterator, not implemented in many environments
  133. // "Array.prototype methods / Array.prototype.values",
  134. "Array.prototype methods / Array.prototype.entries",
  135. ]
  136. },
  137. "es6.number.is-finite": "Number properties / Number.isFinite",
  138. "es6.number.is-integer": "Number properties / Number.isInteger",
  139. "es6.number.is-safe-integer": "Number properties / Number.isSafeInteger",
  140. "es6.number.is-nan": "Number properties / Number.isNaN",
  141. "es6.number.epsilon": "Number properties / Number.EPSILON",
  142. "es6.number.min-safe-integer": "Number properties / Number.MIN_SAFE_INTEGER",
  143. "es6.number.max-safe-integer": "Number properties / Number.MAX_SAFE_INTEGER",
  144. "es6.math.acosh": "Math methods / Math.acosh",
  145. "es6.math.asinh": "Math methods / Math.asinh",
  146. "es6.math.atanh": "Math methods / Math.atanh",
  147. "es6.math.cbrt": "Math methods / Math.cbrt",
  148. "es6.math.clz32": "Math methods / Math.clz32",
  149. "es6.math.cosh": "Math methods / Math.cosh",
  150. "es6.math.expm1": "Math methods / Math.expm1",
  151. "es6.math.fround": "Math methods / Math.fround",
  152. "es6.math.hypot": "Math methods / Math.hypot",
  153. "es6.math.imul": "Math methods / Math.imul",
  154. "es6.math.log1p": "Math methods / Math.log1p",
  155. "es6.math.log10": "Math methods / Math.log10",
  156. "es6.math.log2": "Math methods / Math.log2",
  157. "es6.math.sign": "Math methods / Math.sign",
  158. "es6.math.sinh": "Math methods / Math.sinh",
  159. "es6.math.tanh": "Math methods / Math.tanh",
  160. "es6.math.trunc": "Math methods / Math.trunc",
  161. };
  162. const es2016 = {
  163. "es7.array.includes": "Array.prototype.includes",
  164. };
  165. const es2017 = {
  166. "es7.object.values": "Object static methods / Object.values",
  167. "es7.object.entries": "Object static methods / Object.entries",
  168. "es7.object.get-own-property-descriptors": "Object static methods / Object.getOwnPropertyDescriptors",
  169. "es7.string.pad-start": "String padding / String.prototype.padStart",
  170. "es7.string.pad-end": "String padding / String.prototype.padEnd",
  171. };
  172. module.exports = Object.assign({}, es2015, es2016, es2017);