load-class

1.0.0 • Public • Published

load-class

Requires all files from the specified directory as members of the class.

let loadClass = require('load-class')

// loadClass normally requires a modifier as a first parameter.
// Here we bind the first parameter to a noop function
// so we can work with a partially applied function.
loadClass = loadClass.bind(null, func => func)

class Test {}

module.exports = loadClass(Test, __dirname)

Package Sidebar

Install

npm i load-class

Weekly Downloads

1

Version

1.0.0

License

none

Last publish

Collaborators

  • blitzprog