bind-at

1.0.0 • Public • Published

bind-at

build status Davis Dependency status

NPM

Bind arguments at a certain index.

Example

var bindAt = require('bind-at');
 
var boundFn = bindAt(fn, 'Bob', 1);
 
function fn(greeting, name) {
  return greeting + ' ' + name + '!';
}
 
boundFn('Hello');
// Hello Bob!

Installation

npm install bind-at

Tests

npm test

NPM scripts

  • npm run cover This runs the tests with code coverage
  • npm run lint This will run the linter on your code
  • npm test This will run the tests.
  • npm run trace This will run your tests in tracing mode.
  • npm run travis This is run by travis.CI to run your tests
  • npm run view-cover This will show code coverage in a browser

Contributors

  • Matt Morgan

MIT Licenced

Dependencies (0)

    Dev Dependencies (6)

    Package Sidebar

    Install

    npm i bind-at

    Weekly Downloads

    0

    Version

    1.0.0

    License

    none

    Last publish

    Collaborators

    • mlmorg