https://github.com/invrs/industry-standard-io
Adds StandardIO compliance to factory methods
https://github.com/invrs/industry-standard-io
Last synced: about 1 month ago
JSON representation
Adds StandardIO compliance to factory methods
- Host: GitHub
- URL: https://github.com/invrs/industry-standard-io
- Owner: invrs
- Created: 2016-03-04T00:32:51.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-11T06:53:38.000Z (about 10 years ago)
- Last Synced: 2025-08-09T08:40:05.469Z (12 months ago)
- Language: JavaScript
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# IndustryStandardIO [](https://travis-ci.org/invrs/industry-standard-io)
Adds [StandardIO](https://github.com/invrs/standard-io) compliance to factory methods.
## Requirements
This extension must be paired with [Functions](https://github.com/invrs/industry-functions).
## Usage
```js
import { factory } from "industry"
import { instance } from "industry-instance"
import { functions } from "industry-functions"
import { standard_io } from "industry-standard-io"
class Test {
hello(args) {
args // { a: 1, b: 2, args: { a: 1, b: 2 }, _args: [ "world" ] }
return true
}
}
let test = factory(Test)
.set("instance", instance)
.set("functions", functions)
.set("standard_io", standard_io)
test().hello("world", { a: 1 }, { b: 2 }).then((value) => {
value // true
})
```