MCPcopy Index your code
hub / github.com/nodejs/node / addRules

Method addRules

test/common/wpt.js:270–279  ·  view source on GitHub ↗

* @param {object} rules

(rules)

Source from the content-addressed store, hash-verified

268 * @param {object} rules
269 */
270 addRules(rules) {
271 for (const key of Object.keys(rules)) {
272 if (key.includes('*')) {
273 this.patternMatch.push(new StatusRule(key, rules[key], key));
274 } else {
275 const normalizedPath = path.normalize(key);
276 this.exactMatch[normalizedPath] = new StatusRule(key, rules[key]);
277 }
278 }
279 }
280
281 match(file) {
282 const result = [];

Callers 1

loadMethod · 0.80

Calls 3

includesMethod · 0.80
keysMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected