Miss any of our Open RFC calls?Watch the recordings here! »

industry-functions

0.4.0 • Public • Published

IndustryFunctions Build Status

Retrieve factory instance and class methods.

Usage

import { factory } from "industry"
import { instance } from "industry-instance"
import { functions } from "industry-functions"
 
class Test {
  hello() {}
  static world() {}
}
 
let test = factory(Test)
  .set("instance", instance)
  .set("functions", functions)
 
test().functions()             // { 'hello' => [Function: hello] }
test().constructor.functions() // { 'world' => [Function: world] }

Keywords

none

Install

npm i industry-functions

DownloadsWeekly Downloads

35

Version

0.4.0

License

MIT

Last publish

Collaborators

  • avatar