Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
}), callback)
}
}
}
http.createServer(function (req, res) {
var features = JSON.parse(url.parse(req.url, true).query.features)
var files = Object.keys(features).map(function (name) {
var p = path.join.apply(path, name.split("."))
p = path.join(".", "lib", p + ".js")
return p
})
after.map(files, function (fileName, done) {
path.exists(fileName, function (exists) {
if (exists) {
return done(null, fileName)
} else {
console.log("it does not exist", fileName)
}
done()
})
}, function (err, files) {
var src = files
.filter(function (it) {
return it !== undefined
})
.map(function (it) {
return "require('./" + it + "')"
})
function runDependencyMapper(err, data) {
if (err) {
return callback(err)
}
after.map(data, mapToDependencies, callback)
}