@ject/method

0.0.14 • Public • Published

@ject/method

Make class method.

npm version npm download monthly npm download total npm dependents npm license pp install size github commit last github commit total

Features

  • Make class method

Install

$ npm install @ject/method

Usage

import { Callable } from '@ject/method'
// 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 methodClass = new CallableClass(5, 4)
console.log(methodClass(3)) // 12

Meta

LICENSE (MIT)

Readme

Keywords

Package Sidebar

Install

npm i @ject/method

Weekly Downloads

11

Version

0.0.14

License

MIT

Unpacked Size

9.24 kB

Total Files

5

Last publish

Collaborators

  • hoyeung