Makes context oriented functions easily usable via |>
pipeline operator.
This module enhances the Function.prototype
in a similar way:
Function.prototype.this = function () {
return self => this.apply(self, arguments);
};
You can then use any method that uses this
right away.
const {map, sort} = Array.prototype;
const names = document.querySelectorAll('*')
|> map.this(el => el.nodeName)
|> sort.this();