MCPcopy
hub / github.com/less/less.js / declarationsBlock

Method declarationsBlock

packages/less/lib/less/tree/atrule.js:116–122  ·  view source on GitHub ↗

* @param {Node[]} rules * @param {boolean} [mergeable] * @returns {boolean}

(rules, mergeable = false)

Source from the content-addressed store, hash-verified

114 * @returns {boolean}
115 */
116 declarationsBlock(rules, mergeable = false) {
117 if (!mergeable) {
118 return rules.filter(function (/** @type {Node & { merge?: boolean }} */ node) { return (node.type === 'Declaration' || node.type === 'Comment') && !node.merge}).length === rules.length;
119 } else {
120 return rules.filter(function (/** @type {Node} */ node) { return (node.type === 'Declaration' || node.type === 'Comment'); }).length === rules.length;
121 }
122 }
123
124 /**
125 * @param {Node[]} rules

Callers 2

constructorMethod · 0.95
evalMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected