MCPcopy
hub / github.com/css/csso / needless

Function needless

lib/restructure/6-restructBlock.js:203–218  ·  view source on GitHub ↗
(props, declaration, fingerprints)

Source from the content-addressed store, hash-verified

201}
202
203function needless(props, declaration, fingerprints) {
204 const property = resolveProperty(declaration.property);
205
206 if (NEEDLESS_TABLE.hasOwnProperty(property.basename)) {
207 const table = NEEDLESS_TABLE[property.basename];
208
209 for (const entry of table) {
210 const ppre = getPropertyFingerprint(property.prefix + entry, declaration, fingerprints);
211 const prev = props.hasOwnProperty(ppre) ? props[ppre] : null;
212
213 if (prev && (!declaration.important || prev.item.data.important)) {
214 return prev;
215 }
216 }
217 }
218}
219
220function processRule(rule, item, list, props, fingerprints) {
221 const declarations = rule.block.children;

Callers 1

processRuleFunction · 0.85

Calls 1

getPropertyFingerprintFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…