Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
map: function (options, callback) {
options = extend({}, DEPENDENCY_WRITE_DEFAULTS, options)
var json = require(options.jsonUri)
// the JSON DSL has the option to have "/foo" in
after.reduce(json, createFoldersIntoFilesIterator(options.uri),
{}, runDependencyMapper)
function runDependencyMapper(err, data) {
if (err) {
return callback(err)
}
after.map(data, mapToDependencies, callback)
}
function mapToDependencies(dependencies, moduleName, callback) {
if (isFile.test(moduleName)) {
// the JSON DSL has the option to have "/foo" or ["/foo"]
// in .
after.map(dependencies, createConvertToProxyNameIterator({
moduleName: moduleName,
uri: options.uri