Initial commit from prod-batam

This commit is contained in:
mario
2025-05-27 10:51:12 +07:00
commit e0befad0b8
3361 changed files with 304290 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
const path = require('path');
function excludeNodeModulesExcept(modules) {
var pathSep = path.sep;
if (pathSep == '\\')
// must be quoted for use in a regexp:
pathSep = '\\\\';
var moduleRegExps = modules.map(function (modName) {
return new RegExp('node_modules' + pathSep + modName);
});
return function (modulePath) {
if (/node_modules/.test(modulePath)) {
for (var i = 0; i < moduleRegExps.length; i++)
if (moduleRegExps[i].test(modulePath)) return false;
return true;
}
return false;
};
}
module.exports = excludeNodeModulesExcept;