Comparing version 0.6.1 to 0.6.2
@@ -18,3 +18,3 @@ // src/check.ts | ||
} | ||
function isVariableOf(node, test) { | ||
function isIdentifierOf(node, test) { | ||
return !!node && node.type === "Identifier" && (typeof test === "string" ? node.name === test : test.includes(node.name)); | ||
@@ -358,6 +358,6 @@ } | ||
isFunctionType, | ||
isIdentifierOf, | ||
isLiteralType, | ||
isTs, | ||
isTypeOf, | ||
isVariableOf, | ||
resolveIdentifier, | ||
@@ -364,0 +364,0 @@ resolveLiteral, |
@@ -12,3 +12,3 @@ import { Function, Literal, Node, CallExpression, Identifier, Program, PrivateName, ThisExpression, Super, TemplateLiteral, MemberExpression, ImportSpecifier, ImportDefaultSpecifier, ImportNamespaceSpecifier, ImportDeclaration } from '@babel/types'; | ||
declare function isCallOf(node: Node | null | undefined, test: string | string[] | ((id: string) => boolean)): node is CallExpression; | ||
declare function isVariableOf(node: Node | undefined | null, test: string | string[]): node is Identifier; | ||
declare function isIdentifierOf(node: Node | undefined | null, test: string | string[]): node is Identifier; | ||
declare function isLiteralType(node: Node | undefined | null): node is Literal; | ||
@@ -61,2 +61,2 @@ declare function isFunctionType(node: Node | undefined | null): node is Function; | ||
export { GetNode, ImportBinding, REGEX_DTS, REGEX_LANG_JSX, REGEX_LANG_TS, TS_NODE_TYPES, WithScope, attachScopes, babelParse, escapeKey, getLang, isCallOf, isDts, isFunctionType, isLiteralType, isTs, isTypeOf, isVariableOf, resolveIdentifier, resolveLiteral, resolveString, resolveTemplateLiteral, unwrapTSNode, walkAST, walkImportDeclaration }; | ||
export { GetNode, ImportBinding, REGEX_DTS, REGEX_LANG_JSX, REGEX_LANG_TS, TS_NODE_TYPES, WithScope, attachScopes, babelParse, escapeKey, getLang, isCallOf, isDts, isFunctionType, isIdentifierOf, isLiteralType, isTs, isTypeOf, resolveIdentifier, resolveLiteral, resolveString, resolveTemplateLiteral, unwrapTSNode, walkAST, walkImportDeclaration }; |
@@ -18,3 +18,3 @@ // src/check.ts | ||
} | ||
function isVariableOf(node, test) { | ||
function isIdentifierOf(node, test) { | ||
return !!node && node.type === "Identifier" && (typeof test === "string" ? node.name === test : test.includes(node.name)); | ||
@@ -358,6 +358,6 @@ } | ||
isFunctionType, | ||
isIdentifierOf, | ||
isLiteralType, | ||
isTs, | ||
isTypeOf, | ||
isVariableOf, | ||
resolveIdentifier, | ||
@@ -364,0 +364,0 @@ resolveLiteral, |
{ | ||
"name": "ast-kit", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"packageManager": "pnpm@8.6.0", | ||
@@ -5,0 +5,0 @@ "description": "AST Toolkit.", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39170