@jsenv/core 23.7.1 → 23.8.3

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 (125) hide show
  1. package/dist/jsenv_browser_system.js +34 -34
  2. package/dist/jsenv_browser_system.js.map +119 -1048
  3. package/dist/jsenv_compile_proxy.js.map +62 -364
  4. package/dist/jsenv_exploring_index.js.map +32 -338
  5. package/dist/jsenv_exploring_redirector.js.map +76 -404
  6. package/dist/jsenv_toolbar.js +0 -2
  7. package/dist/jsenv_toolbar.js.map +112 -830
  8. package/dist/jsenv_toolbar_injector.js.map +27 -307
  9. package/helpers/babel/.eslintrc.cjs +24 -24
  10. package/helpers/babel/AsyncGenerator/AsyncGenerator.js +81 -81
  11. package/helpers/babel/AwaitValue/AwaitValue.js +3 -3
  12. package/helpers/babel/applyDecoratorDescriptor/applyDecoratorDescriptor.js +33 -33
  13. package/helpers/babel/arrayLikeToArray/arrayLikeToArray.js +7 -7
  14. package/helpers/babel/arrayWithHoles/arrayWithHoles.js +4 -4
  15. package/helpers/babel/arrayWithoutHoles/arrayWithoutHoles.js +6 -6
  16. package/helpers/babel/assertThisInitialized/assertThisInitialized.js +7 -7
  17. package/helpers/babel/asyncGeneratorDelegate/asyncGeneratorDelegate.js +40 -40
  18. package/helpers/babel/asyncIterator/asyncIterator.js +12 -12
  19. package/helpers/babel/asyncToGenerator/asyncToGenerator.js +34 -34
  20. package/helpers/babel/awaitAsyncGenerator/awaitAsyncGenerator.js +5 -5
  21. package/helpers/babel/classApplyDescriptorDestructureSet/classApplyDescriptorDestructureSet.js +20 -20
  22. package/helpers/babel/classApplyDescriptorGet/classApplyDescriptorGet.js +6 -6
  23. package/helpers/babel/classApplyDescriptorSet/classApplyDescriptorSet.js +13 -13
  24. package/helpers/babel/classCallCheck/classCallCheck.js +5 -5
  25. package/helpers/babel/classCheckPrivateStaticAccess/classCheckPrivateStaticAccess.js +5 -5
  26. package/helpers/babel/classCheckPrivateStaticFieldDescriptor/classCheckPrivateStaticFieldDescriptor.js +6 -6
  27. package/helpers/babel/classExtractFieldDescriptor/classExtractFieldDescriptor.js +7 -7
  28. package/helpers/babel/classNameTDZError/classNameTDZError.js +4 -4
  29. package/helpers/babel/classPrivateFieldDestructureSet/classPrivateFieldDestructureSet.js +7 -7
  30. package/helpers/babel/classPrivateFieldGet/classPrivateFieldGet.js +7 -7
  31. package/helpers/babel/classPrivateFieldLooseBase/classPrivateFieldLooseBase.js +6 -6
  32. package/helpers/babel/classPrivateFieldLooseKey/classPrivateFieldLooseKey.js +5 -5
  33. package/helpers/babel/classPrivateFieldSet/classPrivateFieldSet.js +8 -8
  34. package/helpers/babel/classPrivateMethodGet/classPrivateMethodGet.js +6 -6
  35. package/helpers/babel/classPrivateMethodSet/classPrivateMethodSet.js +3 -3
  36. package/helpers/babel/classStaticPrivateFieldSpecGet/classStaticPrivateFieldSpecGet.js +9 -9
  37. package/helpers/babel/classStaticPrivateFieldSpecSet/classStaticPrivateFieldSpecSet.js +15 -15
  38. package/helpers/babel/classStaticPrivateMethodGet/classStaticPrivateMethodGet.js +6 -6
  39. package/helpers/babel/classStaticPrivateMethodSet/classStaticPrivateMethodSet.js +3 -3
  40. package/helpers/babel/construct/construct.js +16 -16
  41. package/helpers/babel/createClass/createClass.js +15 -15
  42. package/helpers/babel/createForOfIteratorHelper/createForOfIteratorHelper.js +60 -60
  43. package/helpers/babel/createForOfIteratorHelperLoose/createForOfIteratorHelperLoose.js +23 -23
  44. package/helpers/babel/createRawReactElement/createRawReactElement.js +50 -50
  45. package/helpers/babel/createSuper/createSuper.js +22 -22
  46. package/helpers/babel/decorate/decorate.js +403 -403
  47. package/helpers/babel/defaults/defaults.js +11 -11
  48. package/helpers/babel/defineEnumerableProperties/defineEnumerableProperties.js +23 -23
  49. package/helpers/babel/defineProperty/defineProperty.js +18 -18
  50. package/helpers/babel/extends/extends.js +14 -14
  51. package/helpers/babel/get/get.js +13 -13
  52. package/helpers/babel/getPrototypeOf/getPrototypeOf.js +4 -4
  53. package/helpers/babel/inherits/inherits.js +15 -15
  54. package/helpers/babel/inheritsLoose/inheritsLoose.js +7 -7
  55. package/helpers/babel/initializerDefineProperty/initializerDefineProperty.js +10 -10
  56. package/helpers/babel/initializerWarningHelper/initializerWarningHelper.js +6 -6
  57. package/helpers/babel/instanceof/instanceof.js +6 -6
  58. package/helpers/babel/interopRequireDefault/interopRequireDefault.js +3 -3
  59. package/helpers/babel/interopRequireWildcard/interopRequireWildcard.js +37 -37
  60. package/helpers/babel/isNativeFunction/isNativeFunction.js +4 -4
  61. package/helpers/babel/isNativeReflectConstruct/isNativeReflectConstruct.js +21 -21
  62. package/helpers/babel/iterableToArray/iterableToArray.js +7 -7
  63. package/helpers/babel/iterableToArrayLimit/iterableToArrayLimit.js +36 -36
  64. package/helpers/babel/iterableToArrayLimitLoose/iterableToArrayLimitLoose.js +10 -10
  65. package/helpers/babel/jsx/jsx.js +45 -45
  66. package/helpers/babel/maybeArrayLike/maybeArrayLike.js +10 -10
  67. package/helpers/babel/newArrowCheck/newArrowCheck.js +5 -5
  68. package/helpers/babel/nonIterableRest/nonIterableRest.js +5 -5
  69. package/helpers/babel/nonIterableSpread/nonIterableSpread.js +5 -5
  70. package/helpers/babel/objectDestructuringEmpty/objectDestructuringEmpty.js +3 -3
  71. package/helpers/babel/objectSpread/objectSpread.js +23 -23
  72. package/helpers/babel/objectSpread2/objectSpread2.js +33 -33
  73. package/helpers/babel/objectWithoutProperties/objectWithoutProperties.js +19 -19
  74. package/helpers/babel/objectWithoutPropertiesLoose/objectWithoutPropertiesLoose.js +13 -13
  75. package/helpers/babel/possibleConstructorReturn/possibleConstructorReturn.js +10 -10
  76. package/helpers/babel/readOnlyError/readOnlyError.js +4 -4
  77. package/helpers/babel/readme.md +9 -9
  78. package/helpers/babel/set/set.js +44 -44
  79. package/helpers/babel/setPrototypeOf/setPrototypeOf.js +6 -6
  80. package/helpers/babel/skipFirstGeneratorNext/skipFirstGeneratorNext.js +8 -8
  81. package/helpers/babel/slicedToArray/slicedToArray.js +10 -10
  82. package/helpers/babel/slicedToArrayLoose/slicedToArrayLoose.js +13 -13
  83. package/helpers/babel/superPropBase/superPropBase.js +10 -10
  84. package/helpers/babel/taggedTemplateLiteral/taggedTemplateLiteral.js +10 -10
  85. package/helpers/babel/taggedTemplateLiteralLoose/taggedTemplateLiteralLoose.js +7 -7
  86. package/helpers/babel/tdz/tdz.js +4 -4
  87. package/helpers/babel/temporalRef/temporalRef.js +6 -6
  88. package/helpers/babel/temporalUndefined/temporalUndefined.js +3 -3
  89. package/helpers/babel/toArray/toArray.js +10 -10
  90. package/helpers/babel/toConsumableArray/toConsumableArray.js +10 -10
  91. package/helpers/babel/toPrimitive/toPrimitive.js +10 -10
  92. package/helpers/babel/toPropertyKey/toPropertyKey.js +6 -6
  93. package/helpers/babel/typeof/typeof.js +14 -14
  94. package/helpers/babel/unsupportedIterableToArray/unsupportedIterableToArray.js +12 -12
  95. package/helpers/babel/wrapAsyncGenerator/wrapAsyncGenerator.js +8 -8
  96. package/helpers/babel/wrapNativeSuper/wrapNativeSuper.js +30 -30
  97. package/helpers/babel/wrapRegExp/wrapRegExp.js +63 -63
  98. package/helpers/babel/writeOnlyError/writeOnlyError.js +4 -4
  99. package/helpers/regenerator-runtime/regenerator-runtime.js +748 -748
  100. package/{LICENSE → license} +21 -21
  101. package/package.json +2 -2
  102. package/src/internal/compiling/babel_plugin_import_assertions.js +38 -17
  103. package/src/internal/compiling/babel_plugin_import_metadata.js +22 -0
  104. package/src/internal/compiling/babel_plugin_import_visitor.js +84 -0
  105. package/src/internal/compiling/compile-directory/compile-asset.js +0 -7
  106. package/src/internal/compiling/compile-directory/getOrGenerateCompiledFile.js +4 -1
  107. package/src/internal/compiling/compile-directory/updateMeta.js +4 -0
  108. package/src/internal/compiling/compileFile.js +30 -2
  109. package/src/internal/compiling/compileHtml.js +67 -11
  110. package/src/internal/compiling/createCompiledFileService.js +2 -1
  111. package/src/internal/compiling/html_source_file_service.js +28 -3
  112. package/src/internal/compiling/js-compilation-service/jsenvTransform.js +2 -1
  113. package/src/internal/compiling/jsenvCompilerForHtml.js +20 -5
  114. package/src/internal/compiling/jsenvCompilerForJavaScript.js +2 -0
  115. package/src/internal/compiling/startCompileServer.js +16 -16
  116. package/src/internal/compiling/transformResultToCompilationResult.js +3 -0
  117. package/src/internal/executing/coverage/babel_plugin_instrument.js +90 -90
  118. package/src/internal/executing/coverage/reportToCoverage.js +187 -187
  119. package/src/internal/runtime/s.js +727 -727
  120. package/src/internal/toolbar/jsenv-logo.svg +144 -144
  121. package/src/internal/toolbar/toolbar.main.css +10 -2
  122. package/src/internal/toolbar/toolbar.main.js +0 -1
  123. package/src/internal/compiling/babel_plugin_transform_import_specifier.js +0 -86
  124. package/src/internal/toolbar/animation/animation.css +0 -5
  125. package/src/internal/toolbar/variant/variant.css +0 -3
@@ -1,24 +1,24 @@
1
- const eslintConfig = require("../../.eslintrc.cjs")
2
-
3
- // babel helpers are copy pasted from the babel repository
4
- Object.assign(eslintConfig.rules, {
5
- "eqeqeq": ["off"],
6
- "no-eq-null": ["off"],
7
- "no-undef-init": ["off"],
8
- "dot-notation": ["off"],
9
- "consistent-return": ["off"],
10
- "one-var": ["off"],
11
- "object-shorthand": ["off"],
12
- "no-return-assign": ["off"],
13
- "prefer-template": ["off"],
14
- "prefer-rest-params": ["off"],
15
- "no-void": ["off"],
16
- "no-implicit-coercion": ["off"],
17
- "prefer-spread": ["off"],
18
- "no-loop-func": ["off"],
19
- "no-negated-condition": ["off"],
20
- "no-func-assign": ["off"],
21
- "no-else-return": ["off"],
22
- })
23
-
24
- module.exports = eslintConfig
1
+ const eslintConfig = require("../../.eslintrc.cjs")
2
+
3
+ // babel helpers are copy pasted from the babel repository
4
+ Object.assign(eslintConfig.rules, {
5
+ "eqeqeq": ["off"],
6
+ "no-eq-null": ["off"],
7
+ "no-undef-init": ["off"],
8
+ "dot-notation": ["off"],
9
+ "consistent-return": ["off"],
10
+ "one-var": ["off"],
11
+ "object-shorthand": ["off"],
12
+ "no-return-assign": ["off"],
13
+ "prefer-template": ["off"],
14
+ "prefer-rest-params": ["off"],
15
+ "no-void": ["off"],
16
+ "no-implicit-coercion": ["off"],
17
+ "prefer-spread": ["off"],
18
+ "no-loop-func": ["off"],
19
+ "no-negated-condition": ["off"],
20
+ "no-func-assign": ["off"],
21
+ "no-else-return": ["off"],
22
+ })
23
+
24
+ module.exports = eslintConfig
@@ -1,81 +1,81 @@
1
- import AwaitValue from "../AwaitValue/AwaitValue.js"
2
-
3
- export default function AsyncGenerator(gen) {
4
- var front, back
5
- function send(key, arg) {
6
- return new Promise(function (resolve, reject) {
7
- var request = {
8
- key: key,
9
- arg: arg,
10
- resolve: resolve,
11
- reject: reject,
12
- next: null,
13
- }
14
- if (back) {
15
- back = back.next = request
16
- } else {
17
- front = back = request
18
- resume(key, arg)
19
- }
20
- })
21
- }
22
- function resume(key, arg) {
23
- try {
24
- var result = gen[key](arg)
25
- var value = result.value
26
- var wrappedAwait = value instanceof AwaitValue
27
- Promise.resolve(wrappedAwait ? value.wrapped : value).then(
28
- function (arg) {
29
- if (wrappedAwait) {
30
- resume(key === "return" ? "return" : "next", arg)
31
- return
32
- }
33
- settle(result.done ? "return" : "normal", arg)
34
- },
35
- function (err) {
36
- resume("throw", err)
37
- },
38
- )
39
- } catch (err) {
40
- settle("throw", err)
41
- }
42
- }
43
- function settle(type, value) {
44
- switch (type) {
45
- case "return":
46
- front.resolve({ value: value, done: true })
47
- break
48
- case "throw":
49
- front.reject(value)
50
- break
51
- default:
52
- front.resolve({ value: value, done: false })
53
- break
54
- }
55
- front = front.next
56
- if (front) {
57
- resume(front.key, front.arg)
58
- } else {
59
- back = null
60
- }
61
- }
62
- this._invoke = send
63
- // Hide "return" method if generator return is not supported
64
- if (typeof gen.return !== "function") {
65
- this.return = undefined
66
- }
67
- }
68
- AsyncGenerator.prototype[
69
- (typeof Symbol === "function" && Symbol.asyncIterator) || "@@asyncIterator"
70
- ] = function () {
71
- return this
72
- }
73
- AsyncGenerator.prototype.next = function (arg) {
74
- return this._invoke("next", arg)
75
- }
76
- AsyncGenerator.prototype.throw = function (arg) {
77
- return this._invoke("throw", arg)
78
- }
79
- AsyncGenerator.prototype.return = function (arg) {
80
- return this._invoke("return", arg)
81
- }
1
+ import AwaitValue from "../AwaitValue/AwaitValue.js"
2
+
3
+ export default function AsyncGenerator(gen) {
4
+ var front, back
5
+ function send(key, arg) {
6
+ return new Promise(function (resolve, reject) {
7
+ var request = {
8
+ key: key,
9
+ arg: arg,
10
+ resolve: resolve,
11
+ reject: reject,
12
+ next: null,
13
+ }
14
+ if (back) {
15
+ back = back.next = request
16
+ } else {
17
+ front = back = request
18
+ resume(key, arg)
19
+ }
20
+ })
21
+ }
22
+ function resume(key, arg) {
23
+ try {
24
+ var result = gen[key](arg)
25
+ var value = result.value
26
+ var wrappedAwait = value instanceof AwaitValue
27
+ Promise.resolve(wrappedAwait ? value.wrapped : value).then(
28
+ function (arg) {
29
+ if (wrappedAwait) {
30
+ resume(key === "return" ? "return" : "next", arg)
31
+ return
32
+ }
33
+ settle(result.done ? "return" : "normal", arg)
34
+ },
35
+ function (err) {
36
+ resume("throw", err)
37
+ },
38
+ )
39
+ } catch (err) {
40
+ settle("throw", err)
41
+ }
42
+ }
43
+ function settle(type, value) {
44
+ switch (type) {
45
+ case "return":
46
+ front.resolve({ value: value, done: true })
47
+ break
48
+ case "throw":
49
+ front.reject(value)
50
+ break
51
+ default:
52
+ front.resolve({ value: value, done: false })
53
+ break
54
+ }
55
+ front = front.next
56
+ if (front) {
57
+ resume(front.key, front.arg)
58
+ } else {
59
+ back = null
60
+ }
61
+ }
62
+ this._invoke = send
63
+ // Hide "return" method if generator return is not supported
64
+ if (typeof gen.return !== "function") {
65
+ this.return = undefined
66
+ }
67
+ }
68
+ AsyncGenerator.prototype[
69
+ (typeof Symbol === "function" && Symbol.asyncIterator) || "@@asyncIterator"
70
+ ] = function () {
71
+ return this
72
+ }
73
+ AsyncGenerator.prototype.next = function (arg) {
74
+ return this._invoke("next", arg)
75
+ }
76
+ AsyncGenerator.prototype.throw = function (arg) {
77
+ return this._invoke("throw", arg)
78
+ }
79
+ AsyncGenerator.prototype.return = function (arg) {
80
+ return this._invoke("return", arg)
81
+ }
@@ -1,3 +1,3 @@
1
- export default function (value) {
2
- this.wrapped = value
3
- }
1
+ export default function (value) {
2
+ this.wrapped = value
3
+ }
@@ -1,33 +1,33 @@
1
- /* eslint-disable no-void */
2
- export default function _applyDecoratedDescriptor(
3
- target,
4
- property,
5
- decorators,
6
- descriptor,
7
- context,
8
- ) {
9
- var desc = {}
10
- Object.keys(descriptor).forEach(function (key) {
11
- desc[key] = descriptor[key]
12
- })
13
- desc.enumerable = Boolean(desc.enumerable)
14
- desc.configurable = Boolean(desc.configurable)
15
- if ("value" in desc || desc.initializer) {
16
- desc.writable = true
17
- }
18
- desc = decorators
19
- .slice()
20
- .reverse()
21
- .reduce(function (desc, decorator) {
22
- return decorator(target, property, desc) || desc
23
- }, desc)
24
- if (context && desc.initializer !== void 0) {
25
- desc.value = desc.initializer ? desc.initializer.call(context) : void 0
26
- desc.initializer = undefined
27
- }
28
- if (desc.initializer === void 0) {
29
- Object.defineProperty(target, property, desc)
30
- desc = null
31
- }
32
- return desc
33
- }
1
+ /* eslint-disable no-void */
2
+ export default function _applyDecoratedDescriptor(
3
+ target,
4
+ property,
5
+ decorators,
6
+ descriptor,
7
+ context,
8
+ ) {
9
+ var desc = {}
10
+ Object.keys(descriptor).forEach(function (key) {
11
+ desc[key] = descriptor[key]
12
+ })
13
+ desc.enumerable = Boolean(desc.enumerable)
14
+ desc.configurable = Boolean(desc.configurable)
15
+ if ("value" in desc || desc.initializer) {
16
+ desc.writable = true
17
+ }
18
+ desc = decorators
19
+ .slice()
20
+ .reverse()
21
+ .reduce(function (desc, decorator) {
22
+ return decorator(target, property, desc) || desc
23
+ }, desc)
24
+ if (context && desc.initializer !== void 0) {
25
+ desc.value = desc.initializer ? desc.initializer.call(context) : void 0
26
+ desc.initializer = undefined
27
+ }
28
+ if (desc.initializer === void 0) {
29
+ Object.defineProperty(target, property, desc)
30
+ desc = null
31
+ }
32
+ return desc
33
+ }
@@ -1,7 +1,7 @@
1
- /* eslint-disable no-eq-null, eqeqeq */
2
- export default function arrayLikeToArray(arr, len) {
3
- if (len == null || len > arr.length) len = arr.length
4
- var arr2 = new Array(len)
5
- for (var i = 0; i < len; i++) arr2[i] = arr[i]
6
- return arr2
7
- }
1
+ /* eslint-disable no-eq-null, eqeqeq */
2
+ export default function arrayLikeToArray(arr, len) {
3
+ if (len == null || len > arr.length) len = arr.length
4
+ var arr2 = new Array(len)
5
+ for (var i = 0; i < len; i++) arr2[i] = arr[i]
6
+ return arr2
7
+ }
@@ -1,4 +1,4 @@
1
- // eslint-disable-next-line consistent-return
2
- export default (arr) => {
3
- if (Array.isArray(arr)) return arr
4
- }
1
+ // eslint-disable-next-line consistent-return
2
+ export default (arr) => {
3
+ if (Array.isArray(arr)) return arr
4
+ }
@@ -1,6 +1,6 @@
1
- import arrayLikeToArray from "../arrayLikeToArray/arrayLikeToArray.js"
2
-
3
- // eslint-disable-next-line consistent-return
4
- export default (arr) => {
5
- if (Array.isArray(arr)) return arrayLikeToArray(arr)
6
- }
1
+ import arrayLikeToArray from "../arrayLikeToArray/arrayLikeToArray.js"
2
+
3
+ // eslint-disable-next-line consistent-return
4
+ export default (arr) => {
5
+ if (Array.isArray(arr)) return arrayLikeToArray(arr)
6
+ }
@@ -1,7 +1,7 @@
1
- export default (self) => {
2
- // eslint-disable-next-line no-void
3
- if (self === void 0) {
4
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
5
- }
6
- return self
7
- }
1
+ export default (self) => {
2
+ // eslint-disable-next-line no-void
3
+ if (self === void 0) {
4
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called")
5
+ }
6
+ return self
7
+ }
@@ -1,40 +1,40 @@
1
- export default function _asyncGeneratorDelegate(inner, awaitWrap) {
2
- var iter = {},
3
- waiting = false
4
- function pump(key, value) {
5
- waiting = true
6
- value = new Promise(function (resolve) {
7
- resolve(inner[key](value))
8
- })
9
- return { done: false, value: awaitWrap(value) }
10
- }
11
- iter[(typeof Symbol !== "undefined" && Symbol.iterator) || "@@iterator"] = function () {
12
- return this
13
- }
14
- iter.next = function (value) {
15
- if (waiting) {
16
- waiting = false
17
- return value
18
- }
19
- return pump("next", value)
20
- }
21
- if (typeof inner.throw === "function") {
22
- iter.throw = function (value) {
23
- if (waiting) {
24
- waiting = false
25
- throw value
26
- }
27
- return pump("throw", value)
28
- }
29
- }
30
- if (typeof inner.return === "function") {
31
- iter.return = function (value) {
32
- if (waiting) {
33
- waiting = false
34
- return value
35
- }
36
- return pump("return", value)
37
- }
38
- }
39
- return iter
40
- }
1
+ export default function _asyncGeneratorDelegate(inner, awaitWrap) {
2
+ var iter = {},
3
+ waiting = false
4
+ function pump(key, value) {
5
+ waiting = true
6
+ value = new Promise(function (resolve) {
7
+ resolve(inner[key](value))
8
+ })
9
+ return { done: false, value: awaitWrap(value) }
10
+ }
11
+ iter[(typeof Symbol !== "undefined" && Symbol.iterator) || "@@iterator"] = function () {
12
+ return this
13
+ }
14
+ iter.next = function (value) {
15
+ if (waiting) {
16
+ waiting = false
17
+ return value
18
+ }
19
+ return pump("next", value)
20
+ }
21
+ if (typeof inner.throw === "function") {
22
+ iter.throw = function (value) {
23
+ if (waiting) {
24
+ waiting = false
25
+ throw value
26
+ }
27
+ return pump("throw", value)
28
+ }
29
+ }
30
+ if (typeof inner.return === "function") {
31
+ iter.return = function (value) {
32
+ if (waiting) {
33
+ waiting = false
34
+ return value
35
+ }
36
+ return pump("return", value)
37
+ }
38
+ }
39
+ return iter
40
+ }
@@ -1,12 +1,12 @@
1
- /* eslint-disable eqeqeq, no-eq-null */
2
- export default function _asyncIterator(iterable) {
3
- var method
4
- if (typeof Symbol !== "undefined") {
5
- if (Symbol.asyncIterator) method = iterable[Symbol.asyncIterator]
6
- if (method == null && Symbol.iterator) method = iterable[Symbol.iterator]
7
- }
8
- if (method == null) method = iterable["@@asyncIterator"]
9
- if (method == null) method = iterable["@@iterator"]
10
- if (method == null) throw new TypeError("Object is not async iterable")
11
- return method.call(iterable)
12
- }
1
+ /* eslint-disable eqeqeq, no-eq-null */
2
+ export default function _asyncIterator(iterable) {
3
+ var method
4
+ if (typeof Symbol !== "undefined") {
5
+ if (Symbol.asyncIterator) method = iterable[Symbol.asyncIterator]
6
+ if (method == null && Symbol.iterator) method = iterable[Symbol.iterator]
7
+ }
8
+ if (method == null) method = iterable["@@asyncIterator"]
9
+ if (method == null) method = iterable["@@iterator"]
10
+ if (method == null) throw new TypeError("Object is not async iterable")
11
+ return method.call(iterable)
12
+ }
@@ -1,34 +1,34 @@
1
- export default function (fn) {
2
- return function () {
3
- var self = this
4
- // eslint-disable-next-line prefer-rest-params
5
- var args = arguments
6
- return new Promise(function (resolve, reject) {
7
- var gen = fn.apply(self, args)
8
- function _next(value) {
9
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value)
10
- }
11
- function _throw(err) {
12
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err)
13
- }
14
- _next(undefined)
15
- })
16
- }
17
- }
18
-
19
- const asyncGeneratorStep = (gen, resolve, reject, _next, _throw, key, arg) => {
20
- var info
21
- var value
22
- try {
23
- info = gen[key](arg)
24
- value = info.value
25
- } catch (error) {
26
- reject(error)
27
- return
28
- }
29
- if (info.done) {
30
- resolve(value)
31
- } else {
32
- Promise.resolve(value).then(_next, _throw)
33
- }
34
- }
1
+ export default function (fn) {
2
+ return function () {
3
+ var self = this
4
+ // eslint-disable-next-line prefer-rest-params
5
+ var args = arguments
6
+ return new Promise(function (resolve, reject) {
7
+ var gen = fn.apply(self, args)
8
+ function _next(value) {
9
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value)
10
+ }
11
+ function _throw(err) {
12
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err)
13
+ }
14
+ _next(undefined)
15
+ })
16
+ }
17
+ }
18
+
19
+ const asyncGeneratorStep = (gen, resolve, reject, _next, _throw, key, arg) => {
20
+ var info
21
+ var value
22
+ try {
23
+ info = gen[key](arg)
24
+ value = info.value
25
+ } catch (error) {
26
+ reject(error)
27
+ return
28
+ }
29
+ if (info.done) {
30
+ resolve(value)
31
+ } else {
32
+ Promise.resolve(value).then(_next, _throw)
33
+ }
34
+ }
@@ -1,5 +1,5 @@
1
- import AwaitValue from "../AwaitValue/AwaitValue.js"
2
-
3
- export default function (value) {
4
- return new AwaitValue(value)
5
- }
1
+ import AwaitValue from "../AwaitValue/AwaitValue.js"
2
+
3
+ export default function (value) {
4
+ return new AwaitValue(value)
5
+ }
@@ -1,20 +1,20 @@
1
- export default function _classApplyDescriptorDestructureSet(receiver, descriptor) {
2
- if (descriptor.set) {
3
- if (!("__destrObj" in descriptor)) {
4
- descriptor.__destrObj = {
5
- // eslint-disable-next-line accessor-pairs
6
- set value(v) {
7
- descriptor.set.call(receiver, v)
8
- },
9
- }
10
- }
11
- return descriptor.__destrObj
12
- }
13
- if (!descriptor.writable) {
14
- // This should only throw in strict mode, but class bodies are
15
- // always strict and private fields can only be used inside
16
- // class bodies.
17
- throw new TypeError("attempted to set read only private field")
18
- }
19
- return descriptor
20
- }
1
+ export default function _classApplyDescriptorDestructureSet(receiver, descriptor) {
2
+ if (descriptor.set) {
3
+ if (!("__destrObj" in descriptor)) {
4
+ descriptor.__destrObj = {
5
+ // eslint-disable-next-line accessor-pairs
6
+ set value(v) {
7
+ descriptor.set.call(receiver, v)
8
+ },
9
+ }
10
+ }
11
+ return descriptor.__destrObj
12
+ }
13
+ if (!descriptor.writable) {
14
+ // This should only throw in strict mode, but class bodies are
15
+ // always strict and private fields can only be used inside
16
+ // class bodies.
17
+ throw new TypeError("attempted to set read only private field")
18
+ }
19
+ return descriptor
20
+ }
@@ -1,6 +1,6 @@
1
- export default function _classApplyDescriptorGet(receiver, descriptor) {
2
- if (descriptor.get) {
3
- return descriptor.get.call(receiver)
4
- }
5
- return descriptor.value
6
- }
1
+ export default function _classApplyDescriptorGet(receiver, descriptor) {
2
+ if (descriptor.get) {
3
+ return descriptor.get.call(receiver)
4
+ }
5
+ return descriptor.value
6
+ }
@@ -1,13 +1,13 @@
1
- export default function _classApplyDescriptorSet(receiver, descriptor, value) {
2
- if (descriptor.set) {
3
- descriptor.set.call(receiver, value)
4
- } else {
5
- if (!descriptor.writable) {
6
- // This should only throw in strict mode, but class bodies are
7
- // always strict and private fields can only be used inside
8
- // class bodies.
9
- throw new TypeError("attempted to set read only private field")
10
- }
11
- descriptor.value = value
12
- }
13
- }
1
+ export default function _classApplyDescriptorSet(receiver, descriptor, value) {
2
+ if (descriptor.set) {
3
+ descriptor.set.call(receiver, value)
4
+ } else {
5
+ if (!descriptor.writable) {
6
+ // This should only throw in strict mode, but class bodies are
7
+ // always strict and private fields can only be used inside
8
+ // class bodies.
9
+ throw new TypeError("attempted to set read only private field")
10
+ }
11
+ descriptor.value = value
12
+ }
13
+ }
@@ -1,5 +1,5 @@
1
- export default function _classCallCheck(instance, Constructor) {
2
- if (!(instance instanceof Constructor)) {
3
- throw new TypeError("Cannot call a class as a function")
4
- }
5
- }
1
+ export default function _classCallCheck(instance, Constructor) {
2
+ if (!(instance instanceof Constructor)) {
3
+ throw new TypeError("Cannot call a class as a function")
4
+ }
5
+ }
@@ -1,5 +1,5 @@
1
- export default function _classCheckPrivateStaticAccess(receiver, classConstructor) {
2
- if (receiver !== classConstructor) {
3
- throw new TypeError("Private static access of wrong provenance")
4
- }
5
- }
1
+ export default function _classCheckPrivateStaticAccess(receiver, classConstructor) {
2
+ if (receiver !== classConstructor) {
3
+ throw new TypeError("Private static access of wrong provenance")
4
+ }
5
+ }
@@ -1,6 +1,6 @@
1
- export default function _classCheckPrivateStaticFieldDescriptor(descriptor, action) {
2
- if (descriptor === undefined) {
3
- // eslint-disable-next-line prefer-template
4
- throw new TypeError("attempted to " + action + " private static field before its declaration")
5
- }
6
- }
1
+ export default function _classCheckPrivateStaticFieldDescriptor(descriptor, action) {
2
+ if (descriptor === undefined) {
3
+ // eslint-disable-next-line prefer-template
4
+ throw new TypeError("attempted to " + action + " private static field before its declaration")
5
+ }
6
+ }