UNPKG

require-dir-all

Version:

Yet another Node.js helper to require all files in directory

11 lines (9 loc) 288 B
var path = require('path'), fileExt = path.extname(module.filename), fileBase = path.basename(module.filename, fileExt); module.exports = { initialize: function(cb) { console.log('module ' + fileBase + ' initialized'); return cb(false, 'result from '+fileBase+''); } };