MCPcopy
hub / github.com/tailwindlabs/tailwindcss / id

Function id

packages/tailwindcss/src/ast.test.ts:604–622  ·  view source on GitHub ↗
(node: AstNode)

Source from the content-addressed store, hash-verified

602})
603
604function id(node: AstNode) {
605 switch (node.kind) {
606 case 'at-rule':
607 return `${node.name} ${node.params}`
608 case 'rule':
609 return node.selector
610 case 'context':
611 return '<context>'
612 case 'at-root':
613 return '<at-root>'
614 case 'declaration':
615 return `${node.property}: ${node.value}`
616 case 'comment':
617 return `// ${node.value}`
618 default:
619 node satisfies never
620 throw new Error('Unknown node kind')
621 }
622}

Callers 1

ast.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected