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

partial-application

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

partial-application

Enables partial application without affecting the receiver (ie. 'this').

latest
Source
npmnpm
Version
0.0.17
Version published
Weekly downloads
121
-22.44%
Maintainers
1
Weekly downloads
 
Created
Source

partial-application

Enables partial application without affecting the receiver (ie. this).

File size: 592 bytes.
Supported platforms: server and browser.
Supported language versions: ES3 and above.

Also includes a function that will return a function with an arity of one, that can be useful when working with frameworks like Grunt that look at the arity of functions.

If you use this library in your software please tweet me @benastontweet.

Installation

npm install partial-application

Example

var partial = require('partial-application').partial;

function foo() {
  console.log(arguments, this);
}

// Bare invocation.
partial(foo, 0)(1, 2); // { '0': 0, '1': 1, '2': 2 } { /* the global object  */ }

// Method invocation.
var o = {};
o.m = partial(foo, 0);
o.m(1, 2); // { '0': 0, '1': 1, '2': 2 } { m: [Function] }

This software is released under the MIT License. It is Copyright 2015, Ben Aston. I may be contacted at ben@bj.ma.

How to Contribute

Pull requests including bug fixes, new features and improved test coverage are welcomed. Please do your best, where possible, to follow the style of code found in the existing codebase.

Keywords

partial

FAQs

Package last updated on 29 Jun 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