Extend from multiple classes!
npm install extends-classesEver wanted to extend from multiple classes in Javascript? well now you can.
``js
const classes = require('extends-classes');
class Test extends classes (A, B, C) {
}
`
Method missing:
`js
const classes = require('extends-classes');
class Test extends classes (A, B, C) {
constructor() {
super();
}
__call(method, args) {
console.log('${method}()' is missing!);
}
}
const test = new Test();
test.somethingThatIsNonExistent();
// 'somethingThatIsNonExistent()' is missing!
`
MethodMissing is included in the stack, see method-missing.
Check out the test folder for more!
`bash`
$ npm install extends-classes
* Extend multiple es6 classes.
* Simple and light-weight.
* Includes MethodMissing.
* Written in ES6+ for node.js 6+.
* Clean solution to extending from multiple classes.
If you don't like the naming, just change it when requiring.
`js
const many = require('extends-classes');
class Test extends many (A, B, C) {
// class stuff.
}
`
From the package
`bash``
$ npm test