Debian Codegraph @

util/build/transforms/hasFindAll.js

raw symbols SCIP
1 define(["../buildControl"], function(bc) {
2 return function(resource){
3 if(resource.hasTest){
4 return 0;
5 }
6 var
7 hasFeatures = bc.hasFeatures = bc.hasFeatures || {},
8 text = resource.text,
9 hasRe = /[^\w\.]has\s*\(\s*["']([^"']+)["']\s*\)/g,
10 result;
11 while((result = hasRe.exec(text)) != null){
12 var
13 featureName = result[1],
14 sourceSet = hasFeatures[featureName] = hasFeatures[featureName] || {};
15 sourceSet[resource.mid] = 1;
16 }
17 return 0;
18 };
19 });