https://github.com/invrs/industry-functions
Retrieve factory instance and class methods
https://github.com/invrs/industry-functions
Last synced: about 1 month ago
JSON representation
Retrieve factory instance and class methods
- Host: GitHub
- URL: https://github.com/invrs/industry-functions
- Owner: invrs
- Created: 2016-02-21T00:23:53.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-11T06:53:25.000Z (about 10 years ago)
- Last Synced: 2025-10-12T11:46:19.498Z (10 months ago)
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# IndustryFunctions [](https://travis-ci.org/invrs/industry-functions)
Retrieve factory instance and class methods.
## Usage
```js
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] }
```