New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

bind-array

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bind-array

Utility function for binding an array of arguments to a function

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
4
33.33%
Maintainers
1
Weekly downloads
 
Created
Source

Bind-Array

Utility function for binding an array of arguments to a function. Same as apply but without invoking the function.

Usage

var bindArray = require("bind-array");

function foo(a, b, c, d, e) {
    console.log(this, a, b, c, d, e)
}

var bound = bindArray(foo, "this arg", [1, 2, 3, 4, 5]);
bound(); // prints "this arg", 1, 2, 3, 4, 5

API

bindArray(fn:function, thisArg:any, args:array or args:arguments) : function

Keywords

utility

FAQs

Package last updated on 02 Apr 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts