MCPcopy Index your code
hub / github.com/postcss/postcss / getEvents

Function getEvents

lib/lazy-result.js:53–77  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

51}
52
53function getEvents(node) {
54 let key = false
55 let type = TYPE_TO_CLASS_NAME[node.type]
56 if (node.type === 'decl') {
57 key = node.prop.toLowerCase()
58 } else if (node.type === 'atrule') {
59 key = node.name.toLowerCase()
60 }
61
62 if (key && node.append) {
63 return [
64 type,
65 type + '-' + key,
66 CHILDREN,
67 type + 'Exit',
68 type + 'Exit-' + key
69 ]
70 } else if (key) {
71 return [type, type + '-' + key, type + 'Exit', type + 'Exit-' + key]
72 } else if (node.append) {
73 return [type, CHILDREN, type + 'Exit']
74 } else {
75 return [type, type + 'Exit']
76 }
77}
78
79function toStack(node) {
80 let events

Callers 2

toStackFunction · 0.85
walkSyncMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…