react-html-renderer
Advanced tools
Comparing version 0.1.1 to 0.2.1
@@ -1,5 +0,20 @@ | ||
# Change Log | ||
# Changelog | ||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. | ||
### [0.2.1](https://github.com/angeloashmore/react-html-renderer/compare/v0.2.0...v0.2.1) (2019-06-14) | ||
## [0.2.0](https://github.com/angeloashmore/react-html-renderer/compare/v0.1.1...v0.2.0) (2019-06-14) | ||
### Features | ||
* spread props over returned element from parser ([e861356](https://github.com/angeloashmore/react-html-renderer/commit/e861356)) | ||
* update deps and tests ([d72019e](https://github.com/angeloashmore/react-html-renderer/commit/d72019e)) | ||
* update deps and tests ([5f7e281](https://github.com/angeloashmore/react-html-renderer/commit/5f7e281)) | ||
## [0.1.1](https://github.com/angeloashmore/react-html-renderer/compare/v0.1.0...v0.1.1) (2019-04-05) | ||
@@ -6,0 +21,0 @@ |
@@ -8,3 +8,3 @@ 'use strict'; | ||
var React = _interopDefault(require('react')); | ||
var Parser = _interopDefault(require('html-react-parser')); | ||
var parse = _interopDefault(require('html-react-parser')); | ||
var domToReact = _interopDefault(require('html-react-parser/lib/dom-to-react')); | ||
@@ -56,4 +56,3 @@ | ||
nodeChildren = _ref2.children; | ||
var children = null; | ||
if (nodeChildren) children = domToReact(nodeChildren, parserOptions); | ||
var children = nodeChildren ? domToReact(nodeChildren, parserOptions) : null; | ||
var Comp = components[name]; | ||
@@ -66,5 +65,5 @@ if (!Comp) return; | ||
}; | ||
return Parser(html, parserOptions); | ||
return parse(html, parserOptions); | ||
}; | ||
exports.HTMLRenderer = HTMLRenderer; |
import React from 'react'; | ||
import Parser from 'html-react-parser'; | ||
import parse from 'html-react-parser'; | ||
import domToReact from 'html-react-parser/lib/dom-to-react'; | ||
@@ -49,4 +49,3 @@ | ||
nodeChildren = _ref2.children; | ||
var children = null; | ||
if (nodeChildren) children = domToReact(nodeChildren, parserOptions); | ||
var children = nodeChildren ? domToReact(nodeChildren, parserOptions) : null; | ||
var Comp = components[name]; | ||
@@ -59,5 +58,5 @@ if (!Comp) return; | ||
}; | ||
return Parser(html, parserOptions); | ||
return parse(html, parserOptions); | ||
}; | ||
export { HTMLRenderer }; |
{ | ||
"name": "react-html-renderer", | ||
"version": "0.1.1", | ||
"version": "0.2.1", | ||
"description": "React component that renders an HTML string as a React component tree", | ||
@@ -30,20 +30,23 @@ "main": "dist/index.cjs.js", | ||
"dependencies": { | ||
"html-react-parser": "^0.7.0" | ||
"html-react-parser": "^0.7.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.4.3", | ||
"@babel/preset-env": "^7.4.3", | ||
"@commitlint/cli": "^7.5.2", | ||
"@commitlint/config-conventional": "^7.5.0", | ||
"@babel/core": "^7.4.5", | ||
"@babel/preset-env": "^7.4.5", | ||
"@babel/preset-react": "^7.0.0", | ||
"@commitlint/cli": "^8.0.0", | ||
"@commitlint/config-conventional": "^8.0.0", | ||
"@testing-library/react": "^8.0.1", | ||
"babel-core": "^7.0.0-bridge.0", | ||
"babel-jest": "^24.7.1", | ||
"husky": "^1.3.1", | ||
"jest": "^24.7.1", | ||
"prettier": "^1.16.4", | ||
"babel-jest": "^24.8.0", | ||
"husky": "^2.4.1", | ||
"jest": "^24.8.0", | ||
"jest-dom": "^3.5.0", | ||
"prettier": "^1.18.2", | ||
"react": "^16.8.6", | ||
"react-test-renderer": "^16.8.6", | ||
"react-dom": "^16.8.6", | ||
"rimraf": "^2.6.3", | ||
"rollup": "^1.9.0", | ||
"rollup": "^1.15.3", | ||
"rollup-plugin-babel": "4.3.2", | ||
"standard-version": "^5.0.2" | ||
"standard-version": "^6.0.1" | ||
}, | ||
@@ -50,0 +53,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9429
9
18
128
Updatedhtml-react-parser@^0.7.1