UNPKG
@pandabox/unplugin
Version:
latest (0.2.2)
0.2.2
0.2.1
0.2.0
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.1
0.1.0
0.0.2
0.0.1
0.0.0
Panda CSS as a Vite/Rollup/Webpack/Esbuild plugin
astahmer.dev
astahmer/pandabox
@pandabox/unplugin
/
src
/
plugin
/
get-cva-var-name.ts
10 lines
(7 loc)
•
215 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
import
{
Node
}
from
'ts-morph'
export
const
getVariableName
= (
node: Node
) => {
const
parent = node.
getParent
()
if
(!
Node
.
isVariableDeclaration
(parent))
return
const
name = parent.
getName
()
return
name }