0.0.17 • Published 2 years ago

@ject/chore v0.0.17

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@ject/chore

Make class method.

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

//: <> (Shields)

//: <> (Link)

Features

  • Make class method

Install

$ npm install @ject/chore

Usage

import { Callable } from '@ject/chore'
// 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)