async-args
Advanced tools
35
index.js
var jp = require('jsonpointer') | ||
var nextTick | ||
if (process && process.nextTick) { | ||
nextTick = function nextTick (next, args) { | ||
var callback = nextApplyFactory(next, args) | ||
process.nextTick(callback) | ||
} | ||
} else { | ||
nextTick = function nextTick(next, args) { | ||
var callback = nextApplyFactory(next, args) | ||
setTimeout(callback, 0) | ||
} | ||
} | ||
function nextApplyFactory(next, args){ | ||
return function nextApply(){ | ||
next.apply(next, args) | ||
} | ||
} | ||
function storeMetaFactory(lookup) { | ||
@@ -18,3 +37,3 @@ return function storeFactory() { | ||
args.unshift(null) | ||
next.apply(null, args) | ||
nextTick(next, args) | ||
} | ||
@@ -37,3 +56,3 @@ } | ||
args.unshift(null) | ||
next.apply(null, args) | ||
nextTick(next, args) | ||
} | ||
@@ -58,3 +77,3 @@ } | ||
args.unshift(null) | ||
next.apply(null, args) | ||
nextTick(next, args) | ||
} | ||
@@ -79,3 +98,3 @@ } | ||
args.unshift(null) | ||
next.apply(null, args) | ||
nextTick(next, args) | ||
} | ||
@@ -93,3 +112,3 @@ } | ||
args.unshift(null) | ||
next.apply(null, args) | ||
nextTick(next, args) | ||
} | ||
@@ -107,3 +126,3 @@ } | ||
args.unshift(null) | ||
next.apply(null, args) | ||
nextTick(next, args) | ||
} | ||
@@ -121,3 +140,3 @@ } | ||
args.unshift(null) | ||
next.apply(null, args) | ||
nextTick(next, args) | ||
} | ||
@@ -150,3 +169,3 @@ } | ||
newArgs.unshift(null) | ||
next.apply(null, newArgs) | ||
nextTick(next, newArgs) | ||
} | ||
@@ -153,0 +172,0 @@ } |
{ | ||
"name": "async-args", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "A utility for use in conjunction with async.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
12735
3.26%171
11.04%