You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

forgo

Package Overview
Dependencies
Maintainers
1
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

forgo - npm Package Compare versions

Comparing version

to
0.0.34

17

dist/index.js

@@ -257,7 +257,5 @@ "use strict";

// Children will not be an array if single item
const forgoChildren = (Array.isArray(forgoChildrenObj)
const forgoChildren = flatten((Array.isArray(forgoChildrenObj)
? forgoChildrenObj
: [forgoChildrenObj])
.filter((x) => typeof x !== "undefined" && x !== null)
.flat();
: [forgoChildrenObj]).filter((x) => typeof x !== "undefined" && x !== null));
let forgoChildIndex = 0;

@@ -532,2 +530,13 @@ if (forgoChildren) {

exports.rerender = rerender;
function flatten(array, ret = []) {
for (const entry of array) {
if (Array.isArray(entry)) {
flatten(entry, ret);
}
else {
ret.push(entry);
}
}
return ret;
}
/*

@@ -534,0 +543,0 @@ ForgoNodes can be primitive types.

{
"name": "forgo",
"version": "0.0.33",
"version": "0.0.34",
"main": "./dist",

@@ -5,0 +5,0 @@ "author": "Jeswin Kumar<jeswinpk@agilehead.com>",

@@ -539,8 +539,8 @@ declare global {

// Children will not be an array if single item
const forgoChildren = (Array.isArray(forgoChildrenObj)
? forgoChildrenObj
: [forgoChildrenObj]
)
.filter((x) => typeof x !== "undefined" && x !== null)
.flat();
const forgoChildren = flatten(
(Array.isArray(forgoChildrenObj)
? forgoChildrenObj
: [forgoChildrenObj]
).filter((x) => typeof x !== "undefined" && x !== null)
);

@@ -919,2 +919,13 @@ let forgoChildIndex = 0;

function flatten<T>(array: (T | T[])[], ret: T[] = []): T[] {
for (const entry of array) {
if (Array.isArray(entry)) {
flatten(entry, ret);
} else {
ret.push(entry);
}
}
return ret;
}
/*

@@ -921,0 +932,0 @@ ForgoNodes can be primitive types.

Sorry, the diff of this file is not supported yet