# call-bind-apply-helpers

[![github actions](https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/call-bind-apply-helpers)](https://github.com/ljharb/call-bind-apply-helpers/actions) [![coverage](https://codecov.io/gh/ljharb/call-bind-apply-helpers/branch/main/graphs/badge.svg)](https://app.codecov.io/gh/ljharb/call-bind-apply-helpers/) [![dependency status](https://david-dm.org/ljharb/call-bind-apply-helpers.svg)](https://david-dm.org/ljharb/call-bind-apply-helpers) [![dev dependency status](https://david-dm.org/ljharb/call-bind-apply-helpers/dev-status.svg)](https://david-dm.org/ljharb/call-bind-apply-helpers#info=devDependencies) [![License](https://img.shields.io/npm/l/call-bind-apply-helpers.svg)](https://github.com/jcarbonnell/nova/blob/main/use-cases/node_modules/call-bind-apply-helpers/LICENSE/README.md) [![Downloads](https://img.shields.io/npm/dm/call-bind-apply-helpers.svg)](https://npm-stat.com/charts.html?package=call-bind-apply-helpers)

[![npm badge](https://nodei.co/npm/call-bind-apply-helpers.png?downloads=true\&stars=true)](https://npmjs.org/package/call-bind-apply-helpers)

Helper functions around Function call/apply/bind, for use in `call-bind`.

The only packages that should likely ever use this package directly are `call-bind` and `get-intrinsic`. Please use `call-bind` unless you have a very good reason not to.

## Getting started

```sh
npm install --save call-bind-apply-helpers
```

## Usage/Examples

```js
const assert = require('assert');
const callBindBasic = require('call-bind-apply-helpers');

function f(a, b) {
	assert.equal(this, 1);
	assert.equal(a, 2);
	assert.equal(b, 3);
	assert.equal(arguments.length, 2);
}

const fBound = callBindBasic([f, 1]);

delete Function.prototype.call;
delete Function.prototype.bind;

fBound(2, 3);
```

## Tests

Clone the repo, `npm install`, and run `npm test`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://civictech-ou.gitbook.io/nova-docs/use-cases/node_modules/call-bind-apply-helpers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
