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.1.0 to 0.1.1

41

fx.js

@@ -104,7 +104,25 @@ export const

L.flat = L.flatten = function *(iter) {
for (const a of iter) {
if (hasIter(a)) yield *a;
else yield a;
}
L.flat = L.flatten = function(iter) {
iter = iter[Symbol.iterator]();
let flatting = null;
return {
next() {
if (flatting) {
const cur = flatting.next();
if (!cur.done) return cur;
else flatting = null;
}
const cur = iter.next();
if (cur.done) return cur;
return {
value: go1(cur.value, value => {
if (!hasIter(value)) return cur;
flatting = value[Symbol.iterator]();
return flatting.next().value;
}),
done: false
};
},
[Symbol.iterator]() { return this; }
};
};

@@ -194,3 +212,3 @@

const a = cur.value;
const b = go1(a, f);
const b = go1(a, a => f(a, res));
if (!b) return res;

@@ -217,9 +235,5 @@ if (b instanceof Promise) {

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);
const b = go1(a, a => (res.push(a), f(a, res)));
if (b instanceof Promise)
return b.then(b => b ? res : recur()).catch(e => e == nop ? recur() : Promise.reject(e));
if (b) break;

@@ -233,2 +247,3 @@ }

export const

@@ -235,0 +250,0 @@ takeAll = take(Infinity),

{
"name": "fxjs2",
"version": "0.1.0",
"version": "0.1.1",
"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