@jsenv/core 23.5.2 → 23.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/{license → LICENSE} +21 -21
  2. package/dist/jsenv_browser_system.js +35 -35
  3. package/dist/jsenv_browser_system.js.map +14 -14
  4. package/dist/jsenv_compile_proxy.js +47 -128
  5. package/dist/jsenv_compile_proxy.js.map +25 -62
  6. package/dist/jsenv_exploring_index.js.map +5 -5
  7. package/dist/jsenv_exploring_redirector.js +47 -54
  8. package/dist/jsenv_exploring_redirector.js.map +17 -19
  9. package/dist/jsenv_toolbar.js +47 -128
  10. package/dist/jsenv_toolbar.js.map +12 -47
  11. package/dist/jsenv_toolbar_injector.js.map +5 -5
  12. package/helpers/babel/.eslintrc.cjs +24 -24
  13. package/helpers/babel/AsyncGenerator/AsyncGenerator.js +81 -81
  14. package/helpers/babel/AwaitValue/AwaitValue.js +3 -3
  15. package/helpers/babel/applyDecoratorDescriptor/applyDecoratorDescriptor.js +33 -33
  16. package/helpers/babel/arrayLikeToArray/arrayLikeToArray.js +7 -7
  17. package/helpers/babel/arrayWithHoles/arrayWithHoles.js +4 -4
  18. package/helpers/babel/arrayWithoutHoles/arrayWithoutHoles.js +6 -6
  19. package/helpers/babel/assertThisInitialized/assertThisInitialized.js +7 -7
  20. package/helpers/babel/asyncGeneratorDelegate/asyncGeneratorDelegate.js +40 -40
  21. package/helpers/babel/asyncIterator/asyncIterator.js +12 -12
  22. package/helpers/babel/asyncToGenerator/asyncToGenerator.js +34 -34
  23. package/helpers/babel/awaitAsyncGenerator/awaitAsyncGenerator.js +5 -5
  24. package/helpers/babel/classApplyDescriptorDestructureSet/classApplyDescriptorDestructureSet.js +20 -20
  25. package/helpers/babel/classApplyDescriptorGet/classApplyDescriptorGet.js +6 -6
  26. package/helpers/babel/classApplyDescriptorSet/classApplyDescriptorSet.js +13 -13
  27. package/helpers/babel/classCallCheck/classCallCheck.js +5 -5
  28. package/helpers/babel/classCheckPrivateStaticAccess/classCheckPrivateStaticAccess.js +5 -5
  29. package/helpers/babel/classCheckPrivateStaticFieldDescriptor/classCheckPrivateStaticFieldDescriptor.js +6 -6
  30. package/helpers/babel/classExtractFieldDescriptor/classExtractFieldDescriptor.js +7 -7
  31. package/helpers/babel/classNameTDZError/classNameTDZError.js +4 -4
  32. package/helpers/babel/classPrivateFieldDestructureSet/classPrivateFieldDestructureSet.js +7 -7
  33. package/helpers/babel/classPrivateFieldGet/classPrivateFieldGet.js +7 -7
  34. package/helpers/babel/classPrivateFieldLooseBase/classPrivateFieldLooseBase.js +6 -6
  35. package/helpers/babel/classPrivateFieldLooseKey/classPrivateFieldLooseKey.js +5 -5
  36. package/helpers/babel/classPrivateFieldSet/classPrivateFieldSet.js +8 -8
  37. package/helpers/babel/classPrivateMethodGet/classPrivateMethodGet.js +6 -6
  38. package/helpers/babel/classPrivateMethodSet/classPrivateMethodSet.js +3 -3
  39. package/helpers/babel/classStaticPrivateFieldSpecGet/classStaticPrivateFieldSpecGet.js +9 -9
  40. package/helpers/babel/classStaticPrivateFieldSpecSet/classStaticPrivateFieldSpecSet.js +15 -15
  41. package/helpers/babel/classStaticPrivateMethodGet/classStaticPrivateMethodGet.js +6 -6
  42. package/helpers/babel/classStaticPrivateMethodSet/classStaticPrivateMethodSet.js +3 -3
  43. package/helpers/babel/construct/construct.js +16 -16
  44. package/helpers/babel/createClass/createClass.js +15 -15
  45. package/helpers/babel/createForOfIteratorHelper/createForOfIteratorHelper.js +60 -60
  46. package/helpers/babel/createForOfIteratorHelperLoose/createForOfIteratorHelperLoose.js +23 -23
  47. package/helpers/babel/createRawReactElement/createRawReactElement.js +50 -50
  48. package/helpers/babel/createSuper/createSuper.js +22 -22
  49. package/helpers/babel/decorate/decorate.js +403 -403
  50. package/helpers/babel/defaults/defaults.js +11 -11
  51. package/helpers/babel/defineEnumerableProperties/defineEnumerableProperties.js +23 -23
  52. package/helpers/babel/defineProperty/defineProperty.js +18 -18
  53. package/helpers/babel/extends/extends.js +14 -14
  54. package/helpers/babel/get/get.js +13 -13
  55. package/helpers/babel/getPrototypeOf/getPrototypeOf.js +4 -4
  56. package/helpers/babel/inherits/inherits.js +15 -15
  57. package/helpers/babel/inheritsLoose/inheritsLoose.js +7 -7
  58. package/helpers/babel/initializerDefineProperty/initializerDefineProperty.js +10 -10
  59. package/helpers/babel/initializerWarningHelper/initializerWarningHelper.js +6 -6
  60. package/helpers/babel/instanceof/instanceof.js +6 -6
  61. package/helpers/babel/interopRequireDefault/interopRequireDefault.js +3 -3
  62. package/helpers/babel/interopRequireWildcard/interopRequireWildcard.js +37 -37
  63. package/helpers/babel/isNativeFunction/isNativeFunction.js +4 -4
  64. package/helpers/babel/isNativeReflectConstruct/isNativeReflectConstruct.js +21 -21
  65. package/helpers/babel/iterableToArray/iterableToArray.js +7 -7
  66. package/helpers/babel/iterableToArrayLimit/iterableToArrayLimit.js +36 -36
  67. package/helpers/babel/iterableToArrayLimitLoose/iterableToArrayLimitLoose.js +10 -10
  68. package/helpers/babel/jsx/jsx.js +45 -45
  69. package/helpers/babel/maybeArrayLike/maybeArrayLike.js +10 -10
  70. package/helpers/babel/newArrowCheck/newArrowCheck.js +5 -5
  71. package/helpers/babel/nonIterableRest/nonIterableRest.js +5 -5
  72. package/helpers/babel/nonIterableSpread/nonIterableSpread.js +5 -5
  73. package/helpers/babel/objectDestructuringEmpty/objectDestructuringEmpty.js +3 -3
  74. package/helpers/babel/objectSpread/objectSpread.js +23 -23
  75. package/helpers/babel/objectSpread2/objectSpread2.js +33 -33
  76. package/helpers/babel/objectWithoutProperties/objectWithoutProperties.js +19 -19
  77. package/helpers/babel/objectWithoutPropertiesLoose/objectWithoutPropertiesLoose.js +13 -13
  78. package/helpers/babel/possibleConstructorReturn/possibleConstructorReturn.js +10 -10
  79. package/helpers/babel/readOnlyError/readOnlyError.js +4 -4
  80. package/helpers/babel/readme.md +9 -9
  81. package/helpers/babel/set/set.js +44 -44
  82. package/helpers/babel/setPrototypeOf/setPrototypeOf.js +6 -6
  83. package/helpers/babel/skipFirstGeneratorNext/skipFirstGeneratorNext.js +8 -8
  84. package/helpers/babel/slicedToArray/slicedToArray.js +10 -10
  85. package/helpers/babel/slicedToArrayLoose/slicedToArrayLoose.js +13 -13
  86. package/helpers/babel/superPropBase/superPropBase.js +10 -10
  87. package/helpers/babel/taggedTemplateLiteral/taggedTemplateLiteral.js +10 -10
  88. package/helpers/babel/taggedTemplateLiteralLoose/taggedTemplateLiteralLoose.js +7 -7
  89. package/helpers/babel/tdz/tdz.js +4 -4
  90. package/helpers/babel/temporalRef/temporalRef.js +6 -6
  91. package/helpers/babel/temporalUndefined/temporalUndefined.js +3 -3
  92. package/helpers/babel/toArray/toArray.js +10 -10
  93. package/helpers/babel/toConsumableArray/toConsumableArray.js +10 -10
  94. package/helpers/babel/toPrimitive/toPrimitive.js +10 -10
  95. package/helpers/babel/toPropertyKey/toPropertyKey.js +6 -6
  96. package/helpers/babel/typeof/typeof.js +14 -14
  97. package/helpers/babel/unsupportedIterableToArray/unsupportedIterableToArray.js +12 -12
  98. package/helpers/babel/wrapAsyncGenerator/wrapAsyncGenerator.js +8 -8
  99. package/helpers/babel/wrapNativeSuper/wrapNativeSuper.js +30 -30
  100. package/helpers/babel/wrapRegExp/wrapRegExp.js +63 -63
  101. package/helpers/babel/writeOnlyError/writeOnlyError.js +4 -4
  102. package/helpers/regenerator-runtime/regenerator-runtime.js +748 -748
  103. package/package.json +4 -2
  104. package/src/buildProject.js +300 -300
  105. package/src/execute.js +184 -184
  106. package/src/internal/browser-launcher/jsenv-browser-system.js +199 -199
  107. package/src/internal/compiling/compile-directory/getOrGenerateCompiledFile.js +20 -30
  108. package/src/internal/compiling/compile-directory/validateCache.js +23 -15
  109. package/src/internal/compiling/compileFile.js +36 -59
  110. package/src/internal/compiling/compileHtml.js +1 -4
  111. package/src/internal/compiling/createCompiledFileService.js +290 -290
  112. package/src/internal/compiling/startCompileServer.js +1052 -1131
  113. package/src/internal/executing/coverage/babel_plugin_instrument.js +90 -90
  114. package/src/internal/executing/coverage/reportToCoverage.js +187 -187
  115. package/src/internal/executing/executePlan.js +183 -183
  116. package/src/internal/executing/launchAndExecute.js +458 -450
  117. package/src/internal/runtime/createBrowserRuntime/scanBrowserRuntimeFeatures.js +246 -250
  118. package/src/internal/runtime/createNodeRuntime/scanNodeRuntimeFeatures.js +112 -115
  119. package/src/internal/runtime/s.js +727 -727
  120. package/src/internal/toolbar/jsenv-logo.svg +144 -144
  121. package/src/internal/url_conversion.js +317 -317
  122. package/src/launchNode.js +210 -210
  123. package/src/startExploring.js +309 -309
@@ -1,5 +1,5 @@
1
- export default () => {
2
- throw new TypeError(
3
- "Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.",
4
- )
5
- }
1
+ export default () => {
2
+ throw new TypeError(
3
+ "Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.",
4
+ )
5
+ }
@@ -1,5 +1,5 @@
1
- export default () => {
2
- throw new TypeError(
3
- "Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.",
4
- )
5
- }
1
+ export default () => {
2
+ throw new TypeError(
3
+ "Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.",
4
+ )
5
+ }
@@ -1,3 +1,3 @@
1
- export default function _objectDestructuringEmpty(obj) {
2
- if (obj == null) throw new TypeError("Cannot destructure undefined")
3
- }
1
+ export default function _objectDestructuringEmpty(obj) {
2
+ if (obj == null) throw new TypeError("Cannot destructure undefined")
3
+ }
@@ -1,23 +1,23 @@
1
- import defineProperty from "../defineProperty/defineProperty.js"
2
-
3
- export default function (target) {
4
- for (var i = 1; i < arguments.length; i++) {
5
- // eslint-disable-next-line
6
- var source = arguments[i] != null ? Object(arguments[i]) : {}
7
- var ownKeys = Object.keys(source)
8
- if (typeof Object.getOwnPropertySymbols === "function") {
9
- ownKeys.push.apply(
10
- ownKeys,
11
- // eslint-disable-next-line no-loop-func
12
- Object.getOwnPropertySymbols(source).filter(function (sym) {
13
- return Object.getOwnPropertyDescriptor(source, sym).enumerable
14
- }),
15
- )
16
- }
17
- // eslint-disable-next-line no-loop-func
18
- ownKeys.forEach(function (key) {
19
- defineProperty(target, key, source[key])
20
- })
21
- }
22
- return target
23
- }
1
+ import defineProperty from "../defineProperty/defineProperty.js"
2
+
3
+ export default function (target) {
4
+ for (var i = 1; i < arguments.length; i++) {
5
+ // eslint-disable-next-line
6
+ var source = arguments[i] != null ? Object(arguments[i]) : {}
7
+ var ownKeys = Object.keys(source)
8
+ if (typeof Object.getOwnPropertySymbols === "function") {
9
+ ownKeys.push.apply(
10
+ ownKeys,
11
+ // eslint-disable-next-line no-loop-func
12
+ Object.getOwnPropertySymbols(source).filter(function (sym) {
13
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable
14
+ }),
15
+ )
16
+ }
17
+ // eslint-disable-next-line no-loop-func
18
+ ownKeys.forEach(function (key) {
19
+ defineProperty(target, key, source[key])
20
+ })
21
+ }
22
+ return target
23
+ }
@@ -1,33 +1,33 @@
1
- import defineProperty from "../defineProperty/defineProperty.js"
2
-
3
- function ownKeys(object, enumerableOnly) {
4
- var keys = Object.keys(object)
5
- if (Object.getOwnPropertySymbols) {
6
- var symbols = Object.getOwnPropertySymbols(object)
7
- if (enumerableOnly) {
8
- symbols = symbols.filter(function (sym) {
9
- return Object.getOwnPropertyDescriptor(object, sym).enumerable
10
- })
11
- }
12
- keys.push.apply(keys, symbols)
13
- }
14
- return keys
15
- }
16
-
17
- export default function _objectSpread2(target) {
18
- for (var i = 1; i < arguments.length; i++) {
19
- var source = arguments[i] != null ? arguments[i] : {}
20
- if (i % 2) {
21
- ownKeys(Object(source), true).forEach(function (key) {
22
- defineProperty(target, key, source[key])
23
- })
24
- } else if (Object.getOwnPropertyDescriptors) {
25
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source))
26
- } else {
27
- ownKeys(Object(source)).forEach(function (key) {
28
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key))
29
- })
30
- }
31
- }
32
- return target
33
- }
1
+ import defineProperty from "../defineProperty/defineProperty.js"
2
+
3
+ function ownKeys(object, enumerableOnly) {
4
+ var keys = Object.keys(object)
5
+ if (Object.getOwnPropertySymbols) {
6
+ var symbols = Object.getOwnPropertySymbols(object)
7
+ if (enumerableOnly) {
8
+ symbols = symbols.filter(function (sym) {
9
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable
10
+ })
11
+ }
12
+ keys.push.apply(keys, symbols)
13
+ }
14
+ return keys
15
+ }
16
+
17
+ export default function _objectSpread2(target) {
18
+ for (var i = 1; i < arguments.length; i++) {
19
+ var source = arguments[i] != null ? arguments[i] : {}
20
+ if (i % 2) {
21
+ ownKeys(Object(source), true).forEach(function (key) {
22
+ defineProperty(target, key, source[key])
23
+ })
24
+ } else if (Object.getOwnPropertyDescriptors) {
25
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source))
26
+ } else {
27
+ ownKeys(Object(source)).forEach(function (key) {
28
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key))
29
+ })
30
+ }
31
+ }
32
+ return target
33
+ }
@@ -1,19 +1,19 @@
1
- import objectWithoutPropertiesLoose from "../objectWithoutPropertiesLoose/objectWithoutPropertiesLoose.js"
2
-
3
- export default (source, excluded) => {
4
- if (source === null) return {}
5
-
6
- var target = objectWithoutPropertiesLoose(source, excluded)
7
- var key
8
- var i
9
- if (Object.getOwnPropertySymbols) {
10
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source)
11
- for (i = 0; i < sourceSymbolKeys.length; i++) {
12
- key = sourceSymbolKeys[i]
13
- if (excluded.indexOf(key) >= 0) continue
14
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue
15
- target[key] = source[key]
16
- }
17
- }
18
- return target
19
- }
1
+ import objectWithoutPropertiesLoose from "../objectWithoutPropertiesLoose/objectWithoutPropertiesLoose.js"
2
+
3
+ export default (source, excluded) => {
4
+ if (source === null) return {}
5
+
6
+ var target = objectWithoutPropertiesLoose(source, excluded)
7
+ var key
8
+ var i
9
+ if (Object.getOwnPropertySymbols) {
10
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source)
11
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
12
+ key = sourceSymbolKeys[i]
13
+ if (excluded.indexOf(key) >= 0) continue
14
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue
15
+ target[key] = source[key]
16
+ }
17
+ }
18
+ return target
19
+ }
@@ -1,13 +1,13 @@
1
- export default (source, excluded) => {
2
- if (source === null) return {}
3
- var target = {}
4
- var sourceKeys = Object.keys(source)
5
- var key
6
- var i
7
- for (i = 0; i < sourceKeys.length; i++) {
8
- key = sourceKeys[i]
9
- if (excluded.indexOf(key) >= 0) continue
10
- target[key] = source[key]
11
- }
12
- return target
13
- }
1
+ export default (source, excluded) => {
2
+ if (source === null) return {}
3
+ var target = {}
4
+ var sourceKeys = Object.keys(source)
5
+ var key
6
+ var i
7
+ for (i = 0; i < sourceKeys.length; i++) {
8
+ key = sourceKeys[i]
9
+ if (excluded.indexOf(key) >= 0) continue
10
+ target[key] = source[key]
11
+ }
12
+ return target
13
+ }
@@ -1,10 +1,10 @@
1
- import assertThisInitialized from "../assertThisInitialized/assertThisInitialized.js"
2
-
3
- export default (self, call) => {
4
- if (call && (typeof call === "object" || typeof call === "function")) {
5
- return call
6
- } else if (call !== void 0) {
7
- throw new TypeError("Derived constructors may only return object or undefined")
8
- }
9
- return assertThisInitialized(self)
10
- }
1
+ import assertThisInitialized from "../assertThisInitialized/assertThisInitialized.js"
2
+
3
+ export default (self, call) => {
4
+ if (call && (typeof call === "object" || typeof call === "function")) {
5
+ return call
6
+ } else if (call !== void 0) {
7
+ throw new TypeError("Derived constructors may only return object or undefined")
8
+ }
9
+ return assertThisInitialized(self)
10
+ }
@@ -1,4 +1,4 @@
1
- export default function (name) {
2
- // eslint-disable-next-line prefer-template
3
- throw new TypeError(name + " is read-only")
4
- }
1
+ export default function (name) {
2
+ // eslint-disable-next-line prefer-template
3
+ throw new TypeError(name + " is read-only")
4
+ }
@@ -1,9 +1,9 @@
1
- # Babel helpers
2
-
3
- Babel helpers are copied in there to properly appear in sourcemap.
4
-
5
- - All thoose file are inlines versions of babel helpers declared in: https://github.com/babel/babel/blob/main/packages/babel-helpers/src/helpers.js
6
-
7
- - History of the file: https://github.com/babel/babel/commits/main/packages/babel-helpers/src/helpers.js
8
-
9
- - History of individual helpers: https://github.com/babel/babel/commits/main/packages/babel-helpers/src/helpers
1
+ # Babel helpers
2
+
3
+ Babel helpers are copied in there to properly appear in sourcemap.
4
+
5
+ - All thoose file are inlines versions of babel helpers declared in: https://github.com/babel/babel/blob/main/packages/babel-helpers/src/helpers.js
6
+
7
+ - History of the file: https://github.com/babel/babel/commits/main/packages/babel-helpers/src/helpers.js
8
+
9
+ - History of individual helpers: https://github.com/babel/babel/commits/main/packages/babel-helpers/src/helpers
@@ -1,44 +1,44 @@
1
- import superPropBase from "../superPropBase/superPropBase.js"
2
- import defineProperty from "../defineProperty/defineProperty.js"
3
-
4
- function reflectSetPolyfill(target, property, value, receiver) {
5
- var base = superPropBase(target, property)
6
- var desc
7
- if (base) {
8
- desc = Object.getOwnPropertyDescriptor(base, property)
9
- if (desc.set) {
10
- desc.set.call(receiver, value)
11
- return true
12
- } else if (!desc.writable) {
13
- // Both getter and non-writable fall into this.
14
- return false
15
- }
16
- }
17
- // Without a super that defines the property, spec boils down to
18
- // "define on receiver" for some reason.
19
- desc = Object.getOwnPropertyDescriptor(receiver, property)
20
- if (desc) {
21
- if (!desc.writable) {
22
- // Setter, getter, and non-writable fall into this.
23
- return false
24
- }
25
- desc.value = value
26
- Object.defineProperty(receiver, property, desc)
27
- } else {
28
- // Avoid setters that may be defined on Sub's prototype, but not on
29
- // the instance.
30
- defineProperty(receiver, property, value)
31
- }
32
- return true
33
- }
34
-
35
- var reflectSet = typeof Reflect !== "undefined" && Reflect.set ? Reflect.set : reflectSetPolyfill
36
-
37
- export default (target, property, value, receiver, isStrict) => {
38
- // eslint-disable-next-line no-obj-calls
39
- var s = reflectSet(target, property, value, receiver || target)
40
- if (!s && isStrict) {
41
- throw new Error("failed to set property")
42
- }
43
- return value
44
- }
1
+ import superPropBase from "../superPropBase/superPropBase.js"
2
+ import defineProperty from "../defineProperty/defineProperty.js"
3
+
4
+ function reflectSetPolyfill(target, property, value, receiver) {
5
+ var base = superPropBase(target, property)
6
+ var desc
7
+ if (base) {
8
+ desc = Object.getOwnPropertyDescriptor(base, property)
9
+ if (desc.set) {
10
+ desc.set.call(receiver, value)
11
+ return true
12
+ } else if (!desc.writable) {
13
+ // Both getter and non-writable fall into this.
14
+ return false
15
+ }
16
+ }
17
+ // Without a super that defines the property, spec boils down to
18
+ // "define on receiver" for some reason.
19
+ desc = Object.getOwnPropertyDescriptor(receiver, property)
20
+ if (desc) {
21
+ if (!desc.writable) {
22
+ // Setter, getter, and non-writable fall into this.
23
+ return false
24
+ }
25
+ desc.value = value
26
+ Object.defineProperty(receiver, property, desc)
27
+ } else {
28
+ // Avoid setters that may be defined on Sub's prototype, but not on
29
+ // the instance.
30
+ defineProperty(receiver, property, value)
31
+ }
32
+ return true
33
+ }
34
+
35
+ var reflectSet = typeof Reflect !== "undefined" && Reflect.set ? Reflect.set : reflectSetPolyfill
36
+
37
+ export default (target, property, value, receiver, isStrict) => {
38
+ // eslint-disable-next-line no-obj-calls
39
+ var s = reflectSet(target, property, value, receiver || target)
40
+ if (!s && isStrict) {
41
+ throw new Error("failed to set property")
42
+ }
43
+ return value
44
+ }
@@ -1,6 +1,6 @@
1
- export default Object.setPrototypeOf ||
2
- ((o, p) => {
3
- // eslint-disable-next-line no-proto
4
- o.__proto__ = p
5
- return o
6
- })
1
+ export default Object.setPrototypeOf ||
2
+ ((o, p) => {
3
+ // eslint-disable-next-line no-proto
4
+ o.__proto__ = p
5
+ return o
6
+ })
@@ -1,8 +1,8 @@
1
- export default function (fn) {
2
- return function () {
3
- // eslint-disable-next-line prefer-rest-params
4
- var it = fn.apply(this, arguments)
5
- it.next()
6
- return it
7
- }
8
- }
1
+ export default function (fn) {
2
+ return function () {
3
+ // eslint-disable-next-line prefer-rest-params
4
+ var it = fn.apply(this, arguments)
5
+ it.next()
6
+ return it
7
+ }
8
+ }
@@ -1,10 +1,10 @@
1
- import arrayWithHoles from "../arrayWithHoles/arrayWithHoles.js"
2
- import iterableToArrayLimit from "../iterableToArrayLimit/iterableToArrayLimit.js"
3
- import unsupportedIterableToArray from "../unsupportedIterableToArray/unsupportedIterableToArray.js"
4
- import nonIterableRest from "../nonIterableRest/nonIterableRest.js"
5
-
6
- export default (arr, i) =>
7
- arrayWithHoles(arr) ||
8
- iterableToArrayLimit(arr, i) ||
9
- unsupportedIterableToArray(arr, i) ||
10
- nonIterableRest()
1
+ import arrayWithHoles from "../arrayWithHoles/arrayWithHoles.js"
2
+ import iterableToArrayLimit from "../iterableToArrayLimit/iterableToArrayLimit.js"
3
+ import unsupportedIterableToArray from "../unsupportedIterableToArray/unsupportedIterableToArray.js"
4
+ import nonIterableRest from "../nonIterableRest/nonIterableRest.js"
5
+
6
+ export default (arr, i) =>
7
+ arrayWithHoles(arr) ||
8
+ iterableToArrayLimit(arr, i) ||
9
+ unsupportedIterableToArray(arr, i) ||
10
+ nonIterableRest()
@@ -1,13 +1,13 @@
1
- import arrayWithHoles from "../arrayWithHoles/arrayWithHoles.js"
2
- import iterableToArrayLimitLoose from "../iterableToArrayLimitLoose/iterableToArrayLimitLoose.js"
3
- import unsupportedIterableToArray from "../unsupportedIterableToArray/unsupportedIterableToArray.js"
4
- import nonIterableRest from "../nonIterableRest/nonIterableRest.js"
5
-
6
- export default function (arr, i) {
7
- return (
8
- arrayWithHoles(arr) ||
9
- iterableToArrayLimitLoose(arr, i) ||
10
- unsupportedIterableToArray(arr, i) ||
11
- nonIterableRest()
12
- )
13
- }
1
+ import arrayWithHoles from "../arrayWithHoles/arrayWithHoles.js"
2
+ import iterableToArrayLimitLoose from "../iterableToArrayLimitLoose/iterableToArrayLimitLoose.js"
3
+ import unsupportedIterableToArray from "../unsupportedIterableToArray/unsupportedIterableToArray.js"
4
+ import nonIterableRest from "../nonIterableRest/nonIterableRest.js"
5
+
6
+ export default function (arr, i) {
7
+ return (
8
+ arrayWithHoles(arr) ||
9
+ iterableToArrayLimitLoose(arr, i) ||
10
+ unsupportedIterableToArray(arr, i) ||
11
+ nonIterableRest()
12
+ )
13
+ }
@@ -1,10 +1,10 @@
1
- import getPrototypeOf from "../getPrototypeOf/getPrototypeOf.js"
2
-
3
- export default function (object, property) {
4
- // Yes, this throws if object is null to being with, that's on purpose.
5
- while (!Object.prototype.hasOwnProperty.call(object, property)) {
6
- object = getPrototypeOf(object)
7
- if (object === null) break
8
- }
9
- return object
10
- }
1
+ import getPrototypeOf from "../getPrototypeOf/getPrototypeOf.js"
2
+
3
+ export default function (object, property) {
4
+ // Yes, this throws if object is null to being with, that's on purpose.
5
+ while (!Object.prototype.hasOwnProperty.call(object, property)) {
6
+ object = getPrototypeOf(object)
7
+ if (object === null) break
8
+ }
9
+ return object
10
+ }
@@ -1,10 +1,10 @@
1
- export default function (strings, raw) {
2
- if (!raw) {
3
- raw = strings.slice(0)
4
- }
5
- return Object.freeze(
6
- Object.defineProperties(strings, {
7
- raw: { value: Object.freeze(raw) },
8
- }),
9
- )
10
- }
1
+ export default function (strings, raw) {
2
+ if (!raw) {
3
+ raw = strings.slice(0)
4
+ }
5
+ return Object.freeze(
6
+ Object.defineProperties(strings, {
7
+ raw: { value: Object.freeze(raw) },
8
+ }),
9
+ )
10
+ }
@@ -1,7 +1,7 @@
1
- export default function (strings, raw) {
2
- if (!raw) {
3
- raw = strings.slice(0)
4
- }
5
- strings.raw = raw
6
- return strings
7
- }
1
+ export default function (strings, raw) {
2
+ if (!raw) {
3
+ raw = strings.slice(0)
4
+ }
5
+ strings.raw = raw
6
+ return strings
7
+ }
@@ -1,4 +1,4 @@
1
- export default function _tdzError(name) {
2
- // eslint-disable-next-line prefer-template
3
- throw new ReferenceError(name + " is not defined - temporal dead zone")
4
- }
1
+ export default function _tdzError(name) {
2
+ // eslint-disable-next-line prefer-template
3
+ throw new ReferenceError(name + " is not defined - temporal dead zone")
4
+ }
@@ -1,6 +1,6 @@
1
- import undef from "../temporalUndefined/temporalUndefined.js"
2
- import err from "../tdz/tdz.js"
3
-
4
- export default function (val, name) {
5
- return val === undef ? err(name) : val
6
- }
1
+ import undef from "../temporalUndefined/temporalUndefined.js"
2
+ import err from "../tdz/tdz.js"
3
+
4
+ export default function (val, name) {
5
+ return val === undef ? err(name) : val
6
+ }
@@ -1,3 +1,3 @@
1
- // This function isn't mean to be called, but to be used as a reference.
2
- // We can't use a normal object because it isn't hoisted.
3
- export default function () {}
1
+ // This function isn't mean to be called, but to be used as a reference.
2
+ // We can't use a normal object because it isn't hoisted.
3
+ export default function () {}
@@ -1,10 +1,10 @@
1
- import arrayWithHoles from "../arrayWithHoles/arrayWithHoles.js"
2
- import iterableToArray from "../iterableToArray/iterableToArray.js"
3
- import unsupportedIterableToArray from "../unsupportedIterableToArray/unsupportedIterableToArray.js"
4
- import nonIterableRest from "../nonIterableRest/nonIterableRest.js"
5
-
6
- export default (arr) =>
7
- arrayWithHoles(arr) ||
8
- iterableToArray(arr) ||
9
- unsupportedIterableToArray(arr) ||
10
- nonIterableRest()
1
+ import arrayWithHoles from "../arrayWithHoles/arrayWithHoles.js"
2
+ import iterableToArray from "../iterableToArray/iterableToArray.js"
3
+ import unsupportedIterableToArray from "../unsupportedIterableToArray/unsupportedIterableToArray.js"
4
+ import nonIterableRest from "../nonIterableRest/nonIterableRest.js"
5
+
6
+ export default (arr) =>
7
+ arrayWithHoles(arr) ||
8
+ iterableToArray(arr) ||
9
+ unsupportedIterableToArray(arr) ||
10
+ nonIterableRest()
@@ -1,10 +1,10 @@
1
- import arrayWithoutHoles from "../arrayWithoutHoles/arrayWithoutHoles.js"
2
- import iterableToArray from "../iterableToArray/iterableToArray.js"
3
- import unsupportedIterableToArray from "../unsupportedIterableToArray/unsupportedIterableToArray.js"
4
- import nonIterableSpread from "../nonIterableSpread/nonIterableSpread.js"
5
-
6
- export default (arr) =>
7
- arrayWithoutHoles(arr) ||
8
- iterableToArray(arr) ||
9
- unsupportedIterableToArray(arr) ||
10
- nonIterableSpread()
1
+ import arrayWithoutHoles from "../arrayWithoutHoles/arrayWithoutHoles.js"
2
+ import iterableToArray from "../iterableToArray/iterableToArray.js"
3
+ import unsupportedIterableToArray from "../unsupportedIterableToArray/unsupportedIterableToArray.js"
4
+ import nonIterableSpread from "../nonIterableSpread/nonIterableSpread.js"
5
+
6
+ export default (arr) =>
7
+ arrayWithoutHoles(arr) ||
8
+ iterableToArray(arr) ||
9
+ unsupportedIterableToArray(arr) ||
10
+ nonIterableSpread()
@@ -1,10 +1,10 @@
1
- export default function (input, hint /* : "default" | "string" | "number" | void */) {
2
- if (typeof input !== "object" || input === null) return input
3
- var prim = input[Symbol.toPrimitive]
4
- if (prim !== undefined) {
5
- var res = prim.call(input, hint || "default")
6
- if (typeof res !== "object") return res
7
- throw new TypeError("@@toPrimitive must return a primitive value.")
8
- }
9
- return (hint === "string" ? String : Number)(input)
10
- }
1
+ export default function (input, hint /* : "default" | "string" | "number" | void */) {
2
+ if (typeof input !== "object" || input === null) return input
3
+ var prim = input[Symbol.toPrimitive]
4
+ if (prim !== undefined) {
5
+ var res = prim.call(input, hint || "default")
6
+ if (typeof res !== "object") return res
7
+ throw new TypeError("@@toPrimitive must return a primitive value.")
8
+ }
9
+ return (hint === "string" ? String : Number)(input)
10
+ }
@@ -1,6 +1,6 @@
1
- import toPrimitive from "../toPrimitive/toPrimitive.js"
2
-
3
- export default function (arg) {
4
- var key = toPrimitive(arg, "string")
5
- return typeof key === "symbol" ? key : String(key)
6
- }
1
+ import toPrimitive from "../toPrimitive/toPrimitive.js"
2
+
3
+ export default function (arg) {
4
+ var key = toPrimitive(arg, "string")
5
+ return typeof key === "symbol" ? key : String(key)
6
+ }
@@ -1,14 +1,14 @@
1
- const nativeTypeOf = (obj) => typeof obj
2
-
3
- const customTypeOf = (obj) => {
4
- return obj &&
5
- typeof Symbol === "function" &&
6
- obj.constructor === Symbol &&
7
- obj !== Symbol.prototype
8
- ? "symbol"
9
- : typeof obj
10
- }
11
-
12
- export default typeof Symbol === "function" && typeof Symbol.iterator === "symbol"
13
- ? nativeTypeOf
14
- : customTypeOf
1
+ const nativeTypeOf = (obj) => typeof obj
2
+
3
+ const customTypeOf = (obj) => {
4
+ return obj &&
5
+ typeof Symbol === "function" &&
6
+ obj.constructor === Symbol &&
7
+ obj !== Symbol.prototype
8
+ ? "symbol"
9
+ : typeof obj
10
+ }
11
+
12
+ export default typeof Symbol === "function" && typeof Symbol.iterator === "symbol"
13
+ ? nativeTypeOf
14
+ : customTypeOf