Socket
Socket
Sign inDemoInstall

fxjs2

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fxjs2 - npm Package Compare versions

Comparing version 0.0.19 to 0.0.20

77

fx.js

@@ -165,22 +165,63 @@ export const

export const take = curry((l, iter) => {
if (l === 0) return [];
let res = [];
iter = L.values(iter);
return function recur() {
let cur;
while (!(cur = iter.next()).done) {
const a = cur.value;
if (a instanceof Promise) {
return a
.then(a => (res.push(a), res).length == l ? res : recur())
.catch(e => e == nop ? recur() : Promise.reject(e));
export const
take = curry((l, iter) => {
if (l === 0) return [];
let res = [];
iter = L.values(iter);
return function recur() {
let cur;
while (!(cur = iter.next()).done) {
const a = cur.value;
if (a instanceof Promise) {
return a
.then(a => (res.push(a), res).length == l ? res : recur())
.catch(e => e == nop ? recur() : Promise.reject(e));
}
res.push(a);
if (res.length == l) return res;
}
res.push(a);
if (res.length == l) return res;
}
return res;
} ();
});
return res;
} ();
}),
takeWhile = curry((f, iter) => {
let res = [];
iter = L.values(iter);
return function recur() {
let cur;
while (!(cur = iter.next()).done) {
const a = cur.value;
const b = go1(a, f);
if (!b) return res;
if (b instanceof Promise) {
return b
.then(async b => b ? (res.push(await a), recur()) : res)
.catch(e => e == nop ? recur() : Promise.reject(e));
}
res.push(a);
}
return res;
} ();
}),
takeUntil = curry((f, iter) => {
let res = [];
iter = L.values(iter);
return function recur() {
let cur;
while (!(cur = iter.next()).done) {
const a = cur.value;
const b = go1(a, f);
if (b instanceof Promise) {
return b
.then(async b => (res.push(await a), b) ? res : recur())
.catch(e => e == nop ? recur() : Promise.reject(e));
}
res.push(a);
if (b) break;
}
return res;
} ();
});
export const

@@ -187,0 +228,0 @@ takeAll = take(Infinity),

{
"name": "fxjs2",
"version": "0.0.19",
"version": "0.0.20",
"description": "Functional Extensions for Javascript",

@@ -5,0 +5,0 @@ "main": "index.js",

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