MCPcopy
hub / github.com/csscomb/csscomb.js / walk

Function walk

src/options/vendor-prefix-align.js:169–180  ·  view source on GitHub ↗

* Walks across nodes, and call payload for every node that pass * selector check. * * @param {Object} args arguments in form of: * { * node: {object} current node, * selector: {function} propertyName selector * payload: {function} work to do with gathered info

(args)

Source from the content-addressed store, hash-verified

167 * }
168 */
169 function walk(args) {
170 args.node.forEach(function(item, i) {
171 var name = args.selector(item);
172 var namespace = args.namespaceSelector &&
173 makeNamespace(args.namespaceSelector(item));
174 var extraSymbols = args.getExtraSymbols(args.node, i);
175
176 var info = name && getPrefixInfo(name, namespace, extraSymbols);
177 if (!info) return;
178 args.payload(info, i);
179 });
180 }
181
182 /**
183 * Returns property name.

Callers 1

Calls 2

makeNamespaceFunction · 0.85
getPrefixInfoFunction · 0.85

Tested by

no test coverage detected