lad5bg
Last Updated: February 25, 2016
·
1.243K
· cgarvis
51d3be13a400e1ea8cdae57f866e9c11

Auto require a directory in Node.js

results = []
require("fs").readdirSync(__dirname).forEach (file) ->
  results.push require("#{__dirname}/#{file}") unless file is "index.coffee"

module.exports = results
Say Thanks
Respond