Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akyoto/load-class
:open_file_folder: Loads class methods from a directory.
https://github.com/akyoto/load-class
Last synced: about 23 hours ago
JSON representation
:open_file_folder: Loads class methods from a directory.
- Host: GitHub
- URL: https://github.com/akyoto/load-class
- Owner: akyoto
- Created: 2016-10-05T14:17:10.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-10-05T14:30:42.000Z (about 8 years ago)
- Last Synced: 2024-11-01T08:33:56.201Z (6 days ago)
- Language: JavaScript
- Homepage:
- Size: 1000 Bytes
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# load-class
Requires all files from the specified directory as members of the class.
```js
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)
```