pipe.this

0.1.0 • Public • Published

function.this

Build Status Coverage Status

Makes context oriented functions easily usable via |> pipeline operator.

In a nutshell

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();

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    0

Package Sidebar

Install

npm i pipe.this

Weekly Downloads

0

Version

0.1.0

License

ISC

Unpacked Size

2.62 kB

Total Files

4

Last publish

Collaborators

  • webreflection