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

zo

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

zo - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

.gitignore

9

package.json
{
"name": "zo",
"version": "0.0.1",
"version": "0.0.2",
"description": "asynchronous query language, for the usual functional list processing functions: map, select, reduce, but async-friendly",

@@ -12,9 +12,2 @@ "maintainers": [

],
"repository": {
"type": "git",
"url": "https://github.com/refractalize/zo.git"
},
"files": [
"zo.js"
],
"main": "zo.js",

@@ -21,0 +14,0 @@ "dependencies": {

@@ -35,20 +35,15 @@ var _ = require('underscore');

var foldElement = function (first, folder, mapItems) {
var foldl = function (first, folder) {
pipeline.push(function (items, next) {
var n = items.length;
var foldedResult = first;
var xyz = function (foldedResult, index, items, next) {
if (index >= items.length) {
next(foldedResult);
} else {
folder(foldedResult, items[index], function (folded) {
xyz(folded, index + 1, items, next);
});
}
};
if (n > 0) {
_(mapItems(items)).each(function (item) {
folder(foldedResult, item, function (folded) {
foldedResult = folded;
n--;
if (n == 0) {
next(foldedResult);
}
});
});
} else {
next(foldedResult);
}
xyz(first, 0, items, next);
});

@@ -58,12 +53,17 @@ return zo(items, pipeline);

var foldl = function (first, folder) {
return foldElement(first, folder, function (items) {
return items;
});
};
var foldr = function (first, folder) {
pipeline.push(function (items, next) {
var xyz = function (foldedResult, index, items, next) {
if (index < 0) {
next(foldedResult);
} else {
folder(foldedResult, items[index], function (folded) {
xyz(folded, index - 1, items, next);
});
}
};
var foldr = function (first, folder) {
return foldElement(first, folder, function (items) {
return _(items).reverse();
xyz(first, items.length - 1, items, next);
});
return zo(items, pipeline);
};

@@ -70,0 +70,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