🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

callback-with

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

callback-with

Generates a function that is called with initially supplied arguments

0.0.1
latest
Source
npm
Version published
Weekly downloads
47
-11.32%
Maintainers
1
Weekly downloads
 
Created
Source

callback-with

Generates a function that is called with initially supplied arguments.

install

npm i -S callback-with

Usage

// async version
var fn = callbackWith('foo');

fn(function (foo) {
  assert(foo === 'foo'); // true
});

// sync version can return values
var fn = callbackWith.sync('foo');

var bar = fn(function (foo) {
  assert(foo === 'foo'); // true
  return 'bar';
});

assert(bar === 'bar'); // true

Keywords

async

FAQs

Package last updated on 06 Mar 2014

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