'dir' module.exports = the factory method