# function.this

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

Latest version **0.1.0** (published 2018-08-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install function.this
pnpm add function.this
yarn add function.this
bun add function.this
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-08-02 |
| First published | 2018-08-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Andrea Giammarchi |
| Maintainers | webreflection |
| Keywords | pipe, this, context, OOP |

## Links

- npm: https://www.npmjs.com/package/function.this
- Repository: https://github.com/WebReflection/function.this
- Homepage: https://github.com/WebReflection/function.this#readme
- Issues: https://github.com/WebReflection/function.this/issues
- npm.io page: https://npm.io/package/function.this

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2018-08-02
- 0.0.0 — 2018-08-02

## README

# function.this

[![Build Status](https://travis-ci.com/WebReflection/function.this.svg?branch=master)](https://travis-ci.com/WebReflection/function.this) [![Coverage Status](https://coveralls.io/repos/github/WebReflection/function.this/badge.svg?branch=master)](https://coveralls.io/github/WebReflection/function.this?branch=master)

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

### In a nutshell

This module enhances the `Function.prototype` in a similar way:
```js
Function.prototype.this = function () {
  return self => this.apply(self, arguments);
};
```

You can then use any method that uses `this` right away.

```js
const {map, sort} = Array.prototype;
const names = document.querySelectorAll('*')
                |> map.this(el => el.nodeName)
                |> sort.this();
```

---
_Source: https://npm.io/package/function.this · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
