/
var
/
www
/
greso.tech
/
server
/
nsm
/
node_modules
/
requizzle
/
lib
/
wrappers
/
/var/www/greso.tech/server/nsm/node_modules/requizzle/lib/wrappers
mkdir
upload
Name
Size
Mode
Actions
extras.js
594
0644
edit
dl
rm
requirepaths.js
1086
0644
edit
dl
rm
strict.js
303
0644
edit
dl
rm
Edit:
/var/www/greso.tech/server/nsm/node_modules/requizzle/lib/wrappers/requirepaths.js
(1086B)
/* Copyright 2014 Google LLC Use of this source code is governed by the MIT License, available in this package's LICENSE file or at http://opensource.org/licenses/MIT. */ const path = require('path'); function resolvePaths({ filepath }, paths) { if (!paths) { return []; } return paths.slice(0).map((p) => path.resolve(filepath, p)); } function requirePaths(parentModule, opts) { const result = { before: [], after: [], }; if (!parentModule) { return result; } if (Array.isArray(opts)) { result.before = resolvePaths(parentModule, opts); } else { result.before = resolvePaths(parentModule, opts.before); result.after = resolvePaths(parentModule, opts.after); } return result; } exports.before = function before(targetPath, parentModule, opts) { const resolvedPaths = requirePaths(parentModule, opts); return ( `module.paths = ${JSON.stringify(resolvedPaths.before)}.concat(module.paths)` + `.concat(${JSON.stringify(resolvedPaths.after)}); ` ); }; exports.after = function after() { return ''; };
Save
cmd:
run