Natural Preference for Minification

    util-partial
    TypeScript icon, indicating that this package has built-in type declarations

    1.0.1 • Public • Published

    Partial

    NPM version Build status Test coverage Gittip

    Partially apply a function by pre-filling some of its arguments and without changing the this context.

    Installation

    npm install util-partial --save

    Usage

    var partial = require('util-partial');
     
    var add = function (a, b) {
      return a + b;
    };
     
    var add5 = partial(add, 5);
     
    add5(10); //=> 15
    add5(20); //=> 25
    add5(30); //=> 35

    Typings

    Includes a TypeScript type definition.

    License

    MIT

    Install

    npm i util-partial

    DownloadsWeekly Downloads

    6

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • blakeembrey