A few days ago I started to follow Deno more closely. Although I have more than 3 years of experience in Node JS the proposals that Deno makes seem very interesting to me.
So, a couple of days ago I decided to try it out π€·. So I made a little library called "Gusano" (Worm) that allows you to create simple pipelines.
Gusano π
A minimal workflows lib for Deno π¦
Simple example
import { Block, Engine } from 'https://raw.githubusercontent.com/krthr/gusano/master/index.ts'
const sum : Block {
id: 'sum',
name: 'Sum block',
run: (a, b) => Number(a) + Number(b),
version: '0.1.0'
}
const engine = new Engine({ sum })
engine.on('end', ({ result, time }) => {
console.log(result) // [3]
console.log(time) // 2
})
engine.start('sum', 1, 2)
A more complex example / Prime generator
/**
* This block generates `n + 1`.
*/
export const generator: Block = {
id: "generator",
name: "Generator Block",
version: "0.1.0",
run: (n,
β¦I want to share my entire learning journey with you in the future.
PS: I also receive suggestions and PR's ;) hahaa
Top comments (0)