spool
npm install spool
spool
takes functions like this:
{ return a + b} { return a - b} // 13
and lets you call them like this:
const math = v // 13
That way, you can write pure functions, but call them in an OOP style... for some reason.
spool
threads each return value as the first parameter to the next function.
You can also use spoor
to thread each return value as the last parameter to the next function.
You can even wrap mori. This is totally something you should do, and it results in a 100% better api:
const m = v // [ 'foo', 'bar' ]
Here is another example:
v// =>// { path: ["/api/v1", "artists", 1, "albums", 2, "tracks", 3],// method: "GET"// } const client = { return } { return } { return } { return } { return } { return } { return } { return } { return } { return ... path: } { return rs} { if !a return b if !b return a return typeof a === 'object' && typeof b === 'object' ? : b}