You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
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

to
3.6.6

circle.yml

6

dist/index.js

@@ -109,3 +109,7 @@ (function (global, factory) {

if (attributes) {
ret.props = omit(attributes, ['key', 'children']);
ret.props = omit(attributes, ['key', 'children', 'className']);
if (attributes.className && !attributes.class) {
ret.props.class = attributes.className;
}
}

@@ -112,0 +116,0 @@

2

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

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

# preact-render-to-json
[![npm](https://img.shields.io/npm/v/preact-render-to-json.svg)](https://www.npmjs.com/package/preact-render-to-json)
[![CircleCI](https://img.shields.io/circleci/project/github/nathancahill/preact-render-to-json.svg)](https://circleci.com/gh/nathancahill/preact-render-to-json)
Render JSX and [Preact] components to JSON. Useful for [Jest Snapshot testing].

@@ -16,4 +19,4 @@

test('component', () => {
const tree = render(component)
expect(tree).toMatchSnapshot()
const tree = render(component)
expect(tree).toMatchSnapshot()
})

@@ -20,0 +23,0 @@ ```

@@ -97,3 +97,7 @@ import { falsey, assign, getNodeProps, omit } from './util';

if (attributes) {
ret.props = omit(attributes, ['key', 'children']);
ret.props = omit(attributes, ['key', 'children', 'className']);
if (attributes.className && !attributes.class) {
ret.props.class = attributes.className;
}
}

@@ -100,0 +104,0 @@

Sorry, the diff of this file is not supported yet