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

Method getProxyProcessor

lib/node.js:159–188  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

157 }
158
159 getProxyProcessor() {
160 return {
161 get(node, prop) {
162 if (prop === 'proxyOf') {
163 return node
164 } else if (prop === 'root') {
165 return () => node.root().toProxy()
166 } else {
167 return node[prop]
168 }
169 },
170
171 set(node, prop, value) {
172 if (node[prop] === value) return true
173 node[prop] = value
174 if (
175 prop === 'prop' ||
176 prop === 'value' ||
177 prop === 'name' ||
178 prop === 'params' ||
179 prop === 'important' ||
180 /* c8 ignore next */
181 prop === 'text'
182 ) {
183 node.markDirty()
184 }
185 return true
186 }
187 }
188 }
189
190 /* c8 ignore next 3 */
191 markClean() {

Callers 1

toProxyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected