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

react-from-dom

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-from-dom - npm Package Compare versions

Comparing version 0.3.1 to 0.4.0

8

esm/helpers.d.ts

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

interface PlainObject {
[key: string]: any;
}
export declare const styleToObject: (input: string) => PlainObject;
export declare const styleToObject: (input: string) => Record<string, any>;
export declare const noTextChildNodes: string[];

@@ -12,3 +9,2 @@ /**

*/
export declare const possibleStandardNames: PlainObject;
export {};
export declare const possibleStandardNames: Record<string, any>;

@@ -126,2 +126,3 @@ var __read = (this && this.__read) || function (o, n) {

tabindex: 'tabIndex',
typemustmatch: 'typeMustMatch',
usemap: 'useMap',

@@ -128,0 +129,0 @@ // SVG

@@ -47,3 +47,3 @@ var __assign = (this && this.__assign) || function () {

switch (d.name) {
// these are manually handled above, so break;
// this is manually handled above, so break;
case 'class':

@@ -54,8 +54,28 @@ break;

break;
case 'allowfullscreen':
case 'allowpaymentrequest':
case 'async':
case 'autofocus':
case 'autoplay':
case 'checked':
case 'controls':
case 'default':
case 'defer':
case 'disabled':
case 'formnovalidate':
case 'hidden':
case 'ismap':
case 'itemscope':
case 'loop':
case 'multiple':
case 'muted':
case 'nomodule':
case 'novalidate':
case 'open':
case 'readonly':
case 'required':
case 'reversed':
case 'selected':
case 'autoplay':
case 'controls':
attributes[d.name] = d.name;
case 'typemustmatch':
attributes[possibleStandardNames[d.name] || d.name] = true;
break;

@@ -105,3 +125,3 @@ default:

// eslint-disable-next-line no-console
console.warn('The `pre`-method always must return a valid DomNode (instanceof Node) - your modification will be ignored (Hint: if you want to render a React-component, use the `action`-method instead)');
console.warn('The `pre` method always must return a valid DomNode (instanceof Node) - your modification will be ignored (Hint: if you want to render a React-component, use the `post` method instead)');
}

@@ -108,0 +128,0 @@ }

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

interface PlainObject {
[key: string]: any;
}
export declare const styleToObject: (input: string) => PlainObject;
export declare const styleToObject: (input: string) => Record<string, any>;
export declare const noTextChildNodes: string[];

@@ -12,3 +9,2 @@ /**

*/
export declare const possibleStandardNames: PlainObject;
export {};
export declare const possibleStandardNames: Record<string, any>;

@@ -19,2 +19,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.possibleStandardNames = exports.noTextChildNodes = exports.styleToObject = void 0;
exports.styleToObject = function (input) {

@@ -129,2 +130,3 @@ var attributes = input.split(/ ?; ?/);

tabindex: 'tabIndex',
typemustmatch: 'typeMustMatch',
usemap: 'useMap',

@@ -131,0 +133,0 @@ // SVG

@@ -34,2 +34,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.convertFromString = exports.convertFromNode = void 0;
/* eslint-disable @typescript-eslint/no-use-before-define */

@@ -50,3 +51,3 @@ var React = require("react");

switch (d.name) {
// these are manually handled above, so break;
// this is manually handled above, so break;
case 'class':

@@ -57,8 +58,28 @@ break;

break;
case 'allowfullscreen':
case 'allowpaymentrequest':
case 'async':
case 'autofocus':
case 'autoplay':
case 'checked':
case 'controls':
case 'default':
case 'defer':
case 'disabled':
case 'formnovalidate':
case 'hidden':
case 'ismap':
case 'itemscope':
case 'loop':
case 'multiple':
case 'muted':
case 'nomodule':
case 'novalidate':
case 'open':
case 'readonly':
case 'required':
case 'reversed':
case 'selected':
case 'autoplay':
case 'controls':
attributes[d.name] = d.name;
case 'typemustmatch':
attributes[helpers_1.possibleStandardNames[d.name] || d.name] = true;
break;

@@ -108,3 +129,3 @@ default:

// eslint-disable-next-line no-console
console.warn('The `pre`-method always must return a valid DomNode (instanceof Node) - your modification will be ignored (Hint: if you want to render a React-component, use the `action`-method instead)');
console.warn('The `pre` method always must return a valid DomNode (instanceof Node) - your modification will be ignored (Hint: if you want to render a React-component, use the `post` method instead)');
}

@@ -111,0 +132,0 @@ }

{
"name": "react-from-dom",
"version": "0.3.1",
"version": "0.4.0",
"description": "Convert HTML/XML source code or DOM nodes to React elements",

@@ -35,37 +35,38 @@ "author": "Gil Barbara <gilbarbara@gmail.com>",

"@gilbarbara/tsconfig": "^0.1.0",
"@size-limit/preset-small-lib": "^3.0.0",
"@types/enzyme": "^3.10.4",
"@types/jest": "^24.0.25",
"@types/node": "^13.1.6",
"@types/react": "^16.9.17",
"@types/react-dom": "^16.9.4",
"@typescript-eslint/eslint-plugin": "^2.14.0",
"@typescript-eslint/parser": "^2.14.0",
"del-cli": "^3.0.0",
"@size-limit/preset-small-lib": "^4.5.0",
"@types/enzyme": "^3.10.5",
"@types/jest": "^26.0.0",
"@types/node": "^14.0.13",
"@types/react": "^16.9.38",
"@types/react-dom": "^16.9.8",
"@typescript-eslint/eslint-plugin": "^3.3.0",
"@typescript-eslint/parser": "^3.3.0",
"del-cli": "^3.0.1",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-prettier": "^6.9.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.17.0",
"eslint-plugin-react-hooks": "^2.3.0",
"fetch-mock": "^8.3.1",
"husky": "^4.0.6",
"is-ci-cli": "^2.0.0",
"jest": "^24.9.0",
"jest-chain": "^1.1.2",
"eslint-config-airbnb": "^18.1.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-jsx-a11y": "^6.3.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.20.0",
"eslint-plugin-react-hooks": "^4.0.4",
"fetch-mock": "^9.10.1",
"husky": "^4.2.5",
"is-ci-cli": "^2.1.1",
"jest": "^26.0.1",
"jest-chain": "^1.1.5",
"jest-enzyme": "^7.1.2",
"jest-extended": "^0.11.2",
"jest-watch-typeahead": "^0.4.2",
"prettier": "^1.19.1",
"jest-extended": "^0.11.5",
"jest-watch-typeahead": "^0.6.0",
"prettier": "^2.0.5",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-dom": "^16.13.1",
"repo-tools": "^0.2.0",
"serve": "^11.3.0",
"start-server-and-test": "^1.10.6",
"ts-jest": "^24.3.0",
"typescript": "^3.7.4"
"serve": "^11.3.2",
"size-limit": "^4.5.1",
"start-server-and-test": "^1.11.0",
"ts-jest": "^26.1.0",
"typescript": "^3.9.5"
},

@@ -83,4 +84,4 @@ "scripts": {

"format": "prettier \"**/*.{js,jsx,json,yml,yaml,css,less,scss,ts,tsx,md,graphql,mdx}\" --write",
"validate": "npm run lint && npm run test:coverage && npm run size",
"size": "npm run build && size-limit",
"validate": "npm run lint && npm run test:coverage && npm run build && npm run size",
"size": "size-limit",
"prepublishOnly": "npm run validate"

@@ -87,0 +88,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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