summaryrefslogtreecommitdiff
path: root/node_modules/regenerator-transform/lib/util.js
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2026-05-18 23:10:59 +0800
committerlittleblack111 <littleblack11111@gmail.com>2026-05-18 23:41:44 +0800
commitfc87c009806dcc98867f6b58efe29b042aa01dee (patch)
tree8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/regenerator-transform/lib/util.js
parent3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff)
node: updatemain
Diffstat (limited to 'node_modules/regenerator-transform/lib/util.js')
-rw-r--r--node_modules/regenerator-transform/lib/util.js49
1 files changed, 0 insertions, 49 deletions
diff --git a/node_modules/regenerator-transform/lib/util.js b/node_modules/regenerator-transform/lib/util.js
deleted file mode 100644
index 535cbed4..00000000
--- a/node_modules/regenerator-transform/lib/util.js
+++ /dev/null
@@ -1,49 +0,0 @@
-"use strict";
-
-exports.__esModule = true;
-exports.getTypes = getTypes;
-exports.isReference = isReference;
-exports.replaceWithOrRemove = replaceWithOrRemove;
-exports.runtimeProperty = runtimeProperty;
-exports.wrapWithTypes = wrapWithTypes;
-/**
- * Copyright (c) 2014-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-var currentTypes = null;
-function wrapWithTypes(types, fn) {
- return function () {
- var oldTypes = currentTypes;
- currentTypes = types;
- try {
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
- return fn.apply(this, args);
- } finally {
- currentTypes = oldTypes;
- }
- };
-}
-function getTypes() {
- return currentTypes;
-}
-function runtimeProperty(name) {
- var t = getTypes();
- return t.memberExpression(t.identifier("regeneratorRuntime"), t.identifier(name), false);
-}
-function isReference(path) {
- return path.isReferenced() || path.parentPath.isAssignmentExpression({
- left: path.node
- });
-}
-function replaceWithOrRemove(path, replacement) {
- if (replacement) {
- path.replaceWith(replacement);
- } else {
- path.remove();
- }
-} \ No newline at end of file