Closed machendos closed 5 years ago
The function chain in lib/do...
chain
lib/do
const chain = (fn, ...args) => { }
...is written as lambda. So, call with chain.call doesn't actually assign an object context to it
chain.call
Do.prototype.do = function(fn, ...args) { return chain.call(this, fn, ...args); };
As result, only the last composed function will be called, since all the other won't be simply chained, because...
const prev = this instanceof Do ? this : null;
... always is null
The function
chain
inlib/do
......is written as lambda. So, call with
chain.call
doesn't actually assign an object context to itAs result, only the last composed function will be called, since all the other won't be simply chained, because...
... always is null