Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 0.0.29 to 0.0.30

30

dist/index.js

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

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

@@ -267,18 +267,16 @@ if (forgoChildren) {

if (!isForgoElement(forgoChild)) {
if (forgoChild !== undefined && forgoChild !== null) {
// If the first node is a text node, we could pass that along.
// No need to replace here, callee does that.
if (childNodes[forgoChildIndex] &&
childNodes[forgoChildIndex].nodeType === TEXT_NODE_TYPE) {
internalRender(stringOfPrimitiveNode(forgoChild), childNodes[forgoChildIndex], [], fullRerender, boundary);
// If the first node is a text node, we could pass that along.
// No need to replace here, callee does that.
if (childNodes[forgoChildIndex] &&
childNodes[forgoChildIndex].nodeType === TEXT_NODE_TYPE) {
internalRender(stringOfPrimitiveNode(forgoChild), childNodes[forgoChildIndex], [], fullRerender, boundary);
}
// But otherwise, don't pass a replacement node. Just insert instead.
else {
const { node } = internalRender(stringOfPrimitiveNode(forgoChild), undefined, [], fullRerender, boundary);
if (childNodes.length > forgoChildIndex) {
parentElement.insertBefore(node, childNodes[forgoChildIndex]);
}
// But otherwise, don't pass a replacement node. Just insert instead.
else {
const { node } = internalRender(stringOfPrimitiveNode(forgoChild), undefined, [], fullRerender, boundary);
if (childNodes.length > forgoChildIndex) {
parentElement.insertBefore(node, childNodes[forgoChildIndex]);
}
else {
parentElement.appendChild(node);
}
parentElement.appendChild(node);
}

@@ -285,0 +283,0 @@ }

{
"name": "forgo",
"version": "0.0.29",
"version": "0.0.30",
"main": "./dist",

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

@@ -539,5 +539,6 @@ declare global {

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

@@ -556,32 +557,30 @@ let forgoChildIndex = 0;

if (!isForgoElement(forgoChild)) {
if (forgoChild !== undefined && forgoChild !== null) {
// If the first node is a text node, we could pass that along.
// No need to replace here, callee does that.
if (
childNodes[forgoChildIndex] &&
childNodes[forgoChildIndex].nodeType === TEXT_NODE_TYPE
) {
internalRender(
stringOfPrimitiveNode(forgoChild),
childNodes[forgoChildIndex],
[],
fullRerender,
boundary
);
}
// But otherwise, don't pass a replacement node. Just insert instead.
else {
const { node } = internalRender(
stringOfPrimitiveNode(forgoChild),
undefined,
[],
fullRerender,
boundary
);
// If the first node is a text node, we could pass that along.
// No need to replace here, callee does that.
if (
childNodes[forgoChildIndex] &&
childNodes[forgoChildIndex].nodeType === TEXT_NODE_TYPE
) {
internalRender(
stringOfPrimitiveNode(forgoChild),
childNodes[forgoChildIndex],
[],
fullRerender,
boundary
);
}
// But otherwise, don't pass a replacement node. Just insert instead.
else {
const { node } = internalRender(
stringOfPrimitiveNode(forgoChild),
undefined,
[],
fullRerender,
boundary
);
if (childNodes.length > forgoChildIndex) {
parentElement.insertBefore(node, childNodes[forgoChildIndex]);
} else {
parentElement.appendChild(node);
}
if (childNodes.length > forgoChildIndex) {
parentElement.insertBefore(node, childNodes[forgoChildIndex]);
} else {
parentElement.appendChild(node);
}

@@ -588,0 +587,0 @@ }

Sorry, the diff of this file is not supported yet

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