New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grandjs

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grandjs - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

.github/workflows/npmpublish.yml

4

lib/View.d.ts

@@ -12,4 +12,4 @@ import { OptionalObject, NodeInterface } from './interfaces/index';

convertObjectToCss(style: OptionalObject): string;
parser(node: NodeInterface, data: OptionalObject): string;
parseChildren(child: NodeInterface, data: OptionalObject): string;
parser(node: NodeInterface, data: OptionalObject): any;
parseChildren(child: NodeInterface, data: OptionalObject): any;
parseAttributes(props: OptionalObject): {

@@ -16,0 +16,0 @@ attributes: OptionalObject;

@@ -80,3 +80,3 @@ "use strict";

}
else if (typeof node === "object" && node.type) {
else if (typeof node === "object" && typeof node.type === "string") {
let type = node.type;

@@ -88,3 +88,4 @@ let props = node.props;

let parsedChildren = children.map((child) => {
let parsedChild = this.parseChildren(child, data);
// console.log(child);
let parsedChild = this.parseChildren(child, Object.assign(Object.assign(Object.assign({}, data), props), { children }));
if (parsedChild) {

@@ -107,2 +108,7 @@ if (typeof parsedChild === "string") {

}
else if (typeof node === "object" && typeof node.type === "function") {
let component = node.type(Object.assign(Object.assign({}, node.props), { children: node.children }));
let result = this.parser(component, node.props);
return result;
}
}

@@ -113,5 +119,5 @@ parseChildren(child, data) {

}
else if (child.type && typeof child.type === "function") {
else if (child && child.type && typeof child.type === "function") {
let component = child.type;
let node = component(child.props);
let node = component(Object.assign(Object.assign({}, child.props), { children: child.children || [] }));
return this.parser(node, child.props);

@@ -118,0 +124,0 @@ }

{
"name": "grandjs",
"version": "2.0.2",
"version": "2.0.3",
"description": "A backend framework for solid web apps based on node.js",

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

@@ -74,3 +74,3 @@ /**

}
parser(node:NodeInterface, data:OptionalObject) {
parser(node:NodeInterface, data:OptionalObject):any {
let str = "";

@@ -83,3 +83,3 @@ if(Array.isArray(node)) {

return str;
} else if (typeof node === "object" && node.type) {
} else if (typeof node === "object" && typeof node.type === "string") {
let type = node.type;

@@ -91,3 +91,4 @@ let props = node.props;

let parsedChildren = children.map((child) => {
let parsedChild = this.parseChildren(child, data)
// console.log(child);
let parsedChild = this.parseChildren(child, {...data, ...props, children})
if(parsedChild) {

@@ -107,2 +108,6 @@ if(typeof parsedChild === "string") {

return str;
} else if(typeof node === "object" && typeof node.type === "function") {
let component = node.type({...node.props, children: node.children});
let result = this.parser(component, node.props);
return result;
}

@@ -113,5 +118,5 @@ }

return child;
} else if(child.type && typeof child.type === "function") {
} else if(child && child.type && typeof child.type === "function") {
let component = child.type;
let node = component(child.props);
let node = component({...child.props, children: child.children || []});
return this.parser(node, child.props);

@@ -118,0 +123,0 @@ } else {

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