@cfpb/function-bind

1.0.0 • Public • Published

Function-bind

Utility used to create a new function which is bound to a particular context.

Example

JS

var bind = require( 'function-bind' );
var assert = require( 'assert' );
var context = { testing: true };
var mockFunction = function(){ return this };
var boundFunction = bind( mockFunction, context );
assert.equal( boundFunction() === context, true );

Installation

npm install @cfpb/function-bind

Contributing

We welcome your feedback and contributions. See the contribution guidelines for more details.

Additionally, you may want to consider contributing to the Capital Framework, which is the front-end pattern library used in this project.

Open source licensing info

  1. TERMS
  2. LICENSE
  3. CFPB Source Code Policy

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.00latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.00

Package Sidebar

Install

npm i @cfpb/function-bind

Weekly Downloads

0

Version

1.0.0

License

CC0-1.0

Last publish

Collaborators