README
drslib
Utility Library for Structure-Function Architectural pattern
Click here for details of the architecture
Supported typescript
import * as drs from "drslib";
class Increment implements drs.IAction<number, number> {
do(p: number) {
return p + 1
}
}
const action = new drs.Chain<number>()
.join(new drs.Run((p) => p + "0")) // p: number
.join(new drs.Run((p) => parseInt(p) + 1)) // p: string
.join(new Increment())
.create();
const result: number = action.do(1); //result = 12
Installation
npm install drslib