Socket
Socket
Sign inDemoInstall

article-json-html-render

Package Overview
Dependencies
8
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.4.0 to 2.5.0

7

dist/components/article.js

@@ -17,6 +17,9 @@ 'use strict';

render: function render(_ref2) {
var items = _ref2.props.items;
var _ref2$props = _ref2.props;
var items = _ref2$props.items;
var _ref2$props$articlePr = _ref2$props.articleProps;
var articleProps = _ref2$props$articlePr === undefined ? {} : _ref2$props$articlePr;
return (0, _magicVirtualElement2.default)(
'article',
null,
articleProps,
blockList(items)

@@ -23,0 +26,0 @@ );

import element from 'magic-virtual-element';
const setup = ({blockList}) => ({
render: ({props: {items}}) => <article>{blockList(items)}</article>
render: ({props: {items, articleProps = {}}}) => <article {...articleProps}>{blockList(items)}</article>
});
export default setup;
{
"name": "article-json-html-render",
"version": "2.4.0",
"version": "2.5.0",
"description": "Base for html-based article-json renderer, such as [article-json-to-amp](https://www.npmjs.com/package/article-json-to-amp)",

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

@@ -559,1 +559,15 @@ import test from 'tape';

});
test('articleProps', t => {
const Article = setupArticle({ embeds: {} });
const articleProps = {
contenteditable: true,
class: 'custom-article-class'
};
const expected = renderString(tree(<article {...articleProps}></article>));
const actual = renderString(tree(<Article articleProps={articleProps} items={[]} />));
t.equal(actual, expected);
t.end();
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc