@ject/callable
v0.1.1
Published
Make class callable
Downloads
397
Readme
@ject/callable
Make class callable.
Features
- Make class callable
Install
$ npm install @ject/callable
Usage
import { Callable } from '@ject/callable'
// inherit the class Callable
class CallableClass extends Callable {
constructor (a, b) {
super(row => this.a + this.b + row)
this.a = a
this.b = b
}
}
const callableClass = new CallableClass(5, 4)
console.log(callableClass(3)) // 12