drslib
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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

License

Apache License 2.0

Readme

Keywords

Package Sidebar

Install

npm i drslib

Weekly Downloads

1

Version

1.0.0

License

Apache-2.0

Unpacked Size

78.9 kB

Total Files

6

Last publish

Collaborators

  • rcoco