source: imaps-frontend/node_modules/call-bind-apply-helpers/README.md@ 79a0317

main
Last change on this file since 79a0317 was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 2.3 KB
Line 
1# call-bind-apply-helpers <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
2
3[![github actions][actions-image]][actions-url]
4[![coverage][codecov-image]][codecov-url]
5[![dependency status][deps-svg]][deps-url]
6[![dev dependency status][dev-deps-svg]][dev-deps-url]
7[![License][license-image]][license-url]
8[![Downloads][downloads-image]][downloads-url]
9
10[![npm badge][npm-badge-png]][package-url]
11
12Helper functions around Function call/apply/bind, for use in `call-bind`.
13
14The only packages that should likely ever use this package directly are `call-bind` and `get-intrinsic`.
15Please use `call-bind` unless you have a very good reason not to.
16
17## Getting started
18
19```sh
20npm install --save call-bind-apply-helpers
21```
22
23## Usage/Examples
24
25```js
26const assert = require('assert');
27const callBindBasic = require('call-bind-apply-helpers');
28
29function f(a, b) {
30 assert.equal(this, 1);
31 assert.equal(a, 2);
32 assert.equal(b, 3);
33 assert.equal(arguments.length, 2);
34}
35
36const fBound = callBindBasic([f, 1]);
37
38delete Function.prototype.call;
39delete Function.prototype.bind;
40
41fBound(2, 3);
42```
43
44## Tests
45
46Clone the repo, `npm install`, and run `npm test`
47
48[package-url]: https://npmjs.org/package/call-bind-apply-helpers
49[npm-version-svg]: https://versionbadg.es/ljharb/call-bind-apply-helpers.svg
50[deps-svg]: https://david-dm.org/ljharb/call-bind-apply-helpers.svg
51[deps-url]: https://david-dm.org/ljharb/call-bind-apply-helpers
52[dev-deps-svg]: https://david-dm.org/ljharb/call-bind-apply-helpers/dev-status.svg
53[dev-deps-url]: https://david-dm.org/ljharb/call-bind-apply-helpers#info=devDependencies
54[npm-badge-png]: https://nodei.co/npm/call-bind-apply-helpers.png?downloads=true&stars=true
55[license-image]: https://img.shields.io/npm/l/call-bind-apply-helpers.svg
56[license-url]: LICENSE
57[downloads-image]: https://img.shields.io/npm/dm/call-bind-apply-helpers.svg
58[downloads-url]: https://npm-stat.com/charts.html?package=call-bind-apply-helpers
59[codecov-image]: https://codecov.io/gh/ljharb/call-bind-apply-helpers/branch/main/graphs/badge.svg
60[codecov-url]: https://app.codecov.io/gh/ljharb/call-bind-apply-helpers/
61[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/call-bind-apply-helpers
62[actions-url]: https://github.com/ljharb/call-bind-apply-helpers/actions
Note: See TracBrowser for help on using the repository browser.