New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

10

lib/index.js
Function.prototype.async = function() {
var func = this;
var args = arguments;
return this.asyncApply(arguments);
};
Function.prototype.asyncApply = function(args) {
process.nextTick(function() {
func.apply(this, args);
});
this.apply(this, args);
}.bind(this));
};

4

package.json

@@ -5,6 +5,6 @@ {

"description": "A simple, clean way of calling functions asynchronously",
"version": "0.0.1",
"version": "0.0.2",
"repository": {
"type": "git",
"url": "git://github.com/kbjr/node-async-functions.git"
"url": "git://github.com/UmbraEngineering/node-async-functions.git"
},

@@ -11,0 +11,0 @@ "main": "lib/index.js",

@@ -23,3 +23,3 @@ # async-functions

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

@@ -31,2 +31,5 @@ };

bar.bind(scope).async(1, 2); // Logs "Hello!" and then "3"
// Also works in the .apply style
foo.asyncApply([1, 2])
```

@@ -33,0 +36,0 @@

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