Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

call-bound

ljharb25.1mMIT1.0.3TypeScript support: included

Robust call-bound JavaScript intrinsics, using call-bind and get-intrinsic.

javascript, ecmascript, es, js, callbind, callbound, call, bind, bound, call-bind, call-bound, function, es-abstract

readme

call-bound Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Robust call-bound JavaScript intrinsics, using call-bind and get-intrinsic.

Getting started

npm install --save call-bound

Usage/Examples

const assert = require('assert');
const callBound = require('call-bound');

const slice = callBound('Array.prototype.slice');

delete Function.prototype.call;
delete Function.prototype.bind;
delete Array.prototype.slice;

assert.deepEqual(slice([1, 2, 3, 4], 1, -1), [2, 3]);

Tests

Clone the repo, npm install, and run npm test

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v1.0.3 - 2024-12-15

Commits

  • [Refactor] use call-bind-apply-helpers instead of call-bind 5e0b134
  • [Deps] update get-intrinsic 41fc967
  • [readme] fix example 79a0137
  • [meta] add sideEffects flag 08b07be

v1.0.2 - 2024-12-10

Commits

  • [Dev Deps] update @arethetypeswrong/cli, @ljharb/tsconfig, gopd e6a5ffe
  • [Deps] update call-bind, get-intrinsic 2aeb5b5
  • [types] improve return type 1a0c9fe

v1.0.1 - 2024-12-05

Commits

  • Initial implementation, tests, readme, types 6d94121
  • Initial commit 0eae867
  • npm init 71b2479
  • Only apps should have lockfiles c3754a9
  • [actions] skip npm ls in node < 10 74275a5
  • [Dev Deps] add missing peer dep 1354de8