Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

async-functions

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-functions

A simple, clean way of calling functions asynchronously

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

async-functions

A simple, clean way of calling functions asynchronously

Install

$ npm install async-functions

Usage

require('async-functions');

var foo = function(a, b) {
	console.log(a + b);
}

foo.async(1, 2);  // Logs "3", but async!

var bar = function(a, b) {
	console.log(this.baz);
	console.log(a + b);
};

var scope = { baz: 'Hello!' };

bar.bind(scope).async(1, 2);  // Logs "Hello!" and then "3"

// Also works in the .apply style
foo.asyncApply([1, 2])

How does it work?

How do you think..? I modified the Function prototype. Yes, I know, I'm going to hell..

License

None. Public Domain.

FAQs

Package last updated on 27 Jun 2012

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc