-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove optimization from $("node").item case
- Loading branch information
Showing
3 changed files
with
158 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
packages/@n8n/task-runner/src/js-task-runner/built-ins-parser/acorn-helpers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import type { | ||
AssignmentExpression, | ||
Identifier, | ||
Literal, | ||
MemberExpression, | ||
Node, | ||
VariableDeclarator, | ||
} from 'acorn'; | ||
|
||
export function isLiteral(node?: Node): node is Literal { | ||
return node?.type === 'Literal'; | ||
} | ||
|
||
export function isIdentifier(node?: Node): node is Identifier { | ||
return node?.type === 'Identifier'; | ||
} | ||
|
||
export function isMemberExpression(node?: Node): node is MemberExpression { | ||
return node?.type === 'MemberExpression'; | ||
} | ||
|
||
export function isVariableDeclarator(node?: Node): node is VariableDeclarator { | ||
return node?.type === 'VariableDeclarator'; | ||
} | ||
|
||
export function isAssignmentExpression(node?: Node): node is AssignmentExpression { | ||
return node?.type === 'AssignmentExpression'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters