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

asynchronize

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asynchronize - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

35

lib/asynchronize.js

@@ -5,3 +5,13 @@ /*global define */

// Utilities
// ---------
// process.nextTick polyfill for browsers
var nextTick = (
typeof process !== 'undefined' &&
process.platform &&
process.nextTick
) || setTimeout;
// Asynchronize Function

@@ -31,14 +41,19 @@ // ---------------------

// Get the result of the function call
try {
result = fn.apply(null, args);
} catch (err) {
error = err;
}
// Defer execution
nextTick(function () {
// Callback (if there is one)
if (next) {
next(error, result);
}
// Get the result of the function call
try {
result = fn.apply(null, args);
} catch (err) {
error = err;
}
// Callback (if there is one)
if (next) {
next(error, result);
}
});
};

@@ -45,0 +60,0 @@

{
"name": "asynchronize",
"version": "1.0.1",
"version": "1.1.0",

@@ -5,0 +5,0 @@ "description": "Make synchronous functions look asynchronous",

@@ -7,3 +7,3 @@

**Current Version:** *1.0.1*
**Current Version:** *1.1.0*
**Build Status:** [![Build Status][travis-status]][travis]

@@ -10,0 +10,0 @@ **Node Support:** *0.6, 0.8, 0.10*

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