Comparing version 0.1.0 to 0.1.1
@@ -5,3 +5,3 @@ { | ||
"description": "A simple asynchronous routing pattern.", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
34
yarn.js
@@ -1,18 +0,18 @@ | ||
module.exports = function(initial) { | ||
var index = 0; | ||
var sets = []; | ||
var next = function(n){ | ||
if(typeof n == 'number') | ||
{ | ||
return function(){ sets[index++][n].apply(next, arguments); }; | ||
} | ||
else | ||
{ | ||
sets.push(Array.prototype.slice.call(arguments)); | ||
return next; | ||
} | ||
}; | ||
var yarn = function(initial) { | ||
var clew = []; // clew is a series of sets of functions [[f, ...], ...] | ||
var currentSet = 0; | ||
function next(i){ | ||
i = i || 0; | ||
return function(){ clew[currentSet++][i].apply(next, arguments); }; | ||
} | ||
function add(){ | ||
clew.push(Array.prototype.slice.call(arguments)); | ||
return add; | ||
} | ||
initial.call(next); | ||
return next; | ||
}; | ||
setTimeout(function(){ initial.call(next); }, 0); | ||
return add; | ||
}; | ||
if (module) | ||
module.exports = yarn; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
4346
4
0
89
15