opusdev/vector-similarity-api
1
1# call-bound <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 12Robust call-bound JavaScript intrinsics, using `call-bind` and `get-intrinsic`.13 14## Getting started15 16```sh17npm install --save call-bound18```19 20## Usage/Examples21 22```js23const assert = require('assert');24const callBound = require('call-bound');25 26const slice = callBound('Array.prototype.slice');27 28delete Function.prototype.call;29delete Function.prototype.bind;30delete Array.prototype.slice;31 32assert.deepEqual(slice([1, 2, 3, 4], 1, -1), [2, 3]);33```34 35## Tests36 37Clone the repo, `npm install`, and run `npm test`38 39[package-url]: https://npmjs.org/package/call-bound40[npm-version-svg]: https://versionbadg.es/ljharb/call-bound.svg41[deps-svg]: https://david-dm.org/ljharb/call-bound.svg42[deps-url]: https://david-dm.org/ljharb/call-bound43[dev-deps-svg]: https://david-dm.org/ljharb/call-bound/dev-status.svg44[dev-deps-url]: https://david-dm.org/ljharb/call-bound#info=devDependencies45[npm-badge-png]: https://nodei.co/npm/call-bound.png?downloads=true&stars=true46[license-image]: https://img.shields.io/npm/l/call-bound.svg47[license-url]: LICENSE48[downloads-image]: https://img.shields.io/npm/dm/call-bound.svg49[downloads-url]: https://npm-stat.com/charts.html?package=call-bound50[codecov-image]: https://codecov.io/gh/ljharb/call-bound/branch/main/graphs/badge.svg51[codecov-url]: https://app.codecov.io/gh/ljharb/call-bound/52[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/call-bound53[actions-url]: https://github.com/ljharb/call-bound/actions54 