Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

preact-render-to-json

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

preact-render-to-json - npm Package Compare versions

Comparing version 3.6.4 to 3.6.5

18

dist/index.js

@@ -25,2 +25,12 @@ (function (global, factory) {

var omit = function (object, paths) {
return Object.keys(object).reduce(function (result, key) {
if (!paths.includes(key)) {
result[key] = object[key];
}
return result;
}, {});
};
var SHALLOW = { shallow: true };

@@ -49,3 +59,3 @@

if (vnode == null || vnode === false) {
return EMPTY;
return null;
}

@@ -101,5 +111,9 @@

if (attributes) {
ret.props = attributes;
ret.props = omit(attributes, ['key', 'children']);
}
if (attributes && attributes.key) {
ret.key = attributes.key;
}
if (pieces.length) {

@@ -106,0 +120,0 @@ ret.children = pieces;

2

package.json
{
"name": "preact-render-to-json",
"amdName": "preactRenderToJSON",
"version": "3.6.4",
"version": "3.6.5",
"description": "Render JSX and Preact components to JSON",

@@ -6,0 +6,0 @@ "main": "dist/index.js",

@@ -1,2 +0,2 @@

import { falsey, assign, getNodeProps } from './util';
import { falsey, assign, getNodeProps, omit } from './util';

@@ -40,3 +40,3 @@ const SHALLOW = { shallow: true };

if (vnode==null || vnode===false) {
return EMPTY;
return null;
}

@@ -98,5 +98,9 @@

if (attributes) {
ret.props = attributes;
ret.props = omit(attributes, ['key', 'children']);
}
if (attributes && attributes.key) {
ret.key = attributes.key;
}
if (pieces.length) {

@@ -103,0 +107,0 @@ ret.children = pieces;

@@ -16,1 +16,11 @@

}
export const omit = (object, paths) =>
Object.keys(object)
.reduce((result, key) => {
if (!paths.includes(key)) {
result[key] = object[key]; // eslint-disable-line no-param-reassign
}
return result;
}, {});

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