MCPcopy Create free account
hub / github.com/adaptlearning/adapt_framework / generateScriptSafeRegExp

Function generateScriptSafeRegExp

grunt/helpers.js:99–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97 };
98
99 const generateScriptSafeRegExp = function() {
100 const includes = grunt.config('scriptSafe') || [];
101 let re = '';
102 const count = includes.length;
103
104 for (let i = 0; i < count; i++) {
105 // eslint-disable-next-line no-useless-escape
106 re += '\/' + includes[i].toLowerCase() + '\/';
107 if (i < includes.length - 1) re += '|';
108 }
109 return new RegExp(re, 'i');
110 };
111
112 const appendSlash = function(dir) {
113 if (dir) {

Callers 1

getScriptSafeRegExpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected