MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / unwrapExpression

Function unwrapExpression

scripts/oxlint-plugin-executor/utils.js:29–41  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

27}
28
29export function unwrapExpression(node) {
30 let current = node;
31 while (
32 current?.type === "ChainExpression" ||
33 current?.type === "ParenthesizedExpression" ||
34 current?.type === "TSNonNullExpression" ||
35 current?.type === "TSAsExpression" ||
36 current?.type === "TSTypeAssertion"
37 ) {
38 current = current.expression;
39 }
40 return current;
41}
42
43export function getPropertyName(node) {
44 if (!node) return undefined;

Callers 15

isGlobalFetchMemberFunction · 0.90
isBareFetchCallFunction · 0.90
isErrorLikeIdentifierFunction · 0.90
parameterNameFunction · 0.90
CallExpressionFunction · 0.90
isRawDurableObjectIdCallFunction · 0.90
isPromiseRejectFunction · 0.90
isPromiseConstructorFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected