Sha256: 45d28d43f595d44e72bd9a9c20b0fd376fdcb2c706fc67ba15d1ce653f58170c

Contents?: true

Size: 1.01 KB

Versions: 25

Compression:

Stored size: 1.01 KB

Contents

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.isTransparentExprWrapper = isTransparentExprWrapper;
exports.skipTransparentExprWrapperNodes = skipTransparentExprWrapperNodes;
exports.skipTransparentExprWrappers = skipTransparentExprWrappers;
var _t = require("@babel/types");
const {
  isParenthesizedExpression,
  isTSAsExpression,
  isTSNonNullExpression,
  isTSSatisfiesExpression,
  isTSTypeAssertion,
  isTypeCastExpression
} = _t;
function isTransparentExprWrapper(node) {
  return isTSAsExpression(node) || isTSSatisfiesExpression(node) || isTSTypeAssertion(node) || isTSNonNullExpression(node) || isTypeCastExpression(node) || isParenthesizedExpression(node);
}
function skipTransparentExprWrappers(path) {
  while (isTransparentExprWrapper(path.node)) {
    path = path.get("expression");
  }
  return path;
}
function skipTransparentExprWrapperNodes(node) {
  while (isTransparentExprWrapper(node)) {
    node = node.expression;
  }
  return node;
}

//# sourceMappingURL=index.js.map

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
immosquare-cleaner-0.1.62 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
immosquare-cleaner-0.1.61 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
immosquare-cleaner-0.1.60 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
immosquare-cleaner-0.1.59 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
immosquare-cleaner-0.1.58 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
immosquare-cleaner-0.1.57 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
immosquare-cleaner-0.1.56 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
immosquare-cleaner-0.1.55 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
immosquare-cleaner-0.1.54 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
immosquare-cleaner-0.1.53 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
immosquare-cleaner-0.1.52 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
immosquare-cleaner-0.1.51 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
immosquare-cleaner-0.1.50 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
immosquare-cleaner-0.1.49 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
immosquare-cleaner-0.1.48 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
immosquare-cleaner-0.1.47 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
immosquare-cleaner-0.1.46 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
immosquare-cleaner-0.1.45 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
immosquare-cleaner-0.1.44 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js
immosquare-cleaner-0.1.43 node_modules/@babel/helper-skip-transparent-expression-wrappers/lib/index.js