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

mithril-node-render

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mithril-node-render - npm Package Compare versions

Comparing version 0.3.3 to 0.4.0

5

index.js
'use strict';
var VOID_TAGS = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr',
'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr'];
'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track',
'wbr', '!doctype'];

@@ -36,3 +37,3 @@ function isArray(thing) {

return Object.keys(attrs).map(function(name) {
if (typeof attrs[name] === 'function') {
if (typeof attrs[name] === 'undefined' || typeof attrs[name] === 'function') {
return;

@@ -39,0 +40,0 @@ }

2

package.json
{
"name": "mithril-node-render",
"version": "0.3.3",
"version": "0.4.0",
"description": "Node rending of mithril views",

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

@@ -16,2 +16,6 @@ 'use strict';

t.equal(render(m('HR')), '<HR>', 'should render short nodes when no children and tag name is uppercase');
t.equal(render(m('!doctype')), '<!doctype>',
'should render short node doctype');
t.equal(render(m('!doctype', {html: true})), '<!doctype html>',
'should render short node doctype HTML5');
t.equal(render(m('span', {

@@ -43,2 +47,4 @@ 'data-foo': 'bar',

t.equal(render(m('div', { a: false})), '<div></div>');
t.equal(render(m('div', { a: undefined})), '<div></div>');
t.equal(render(m('div', { a: 'foo'})), '<div a="foo"></div>');
t.equal(render(m('div', m.trust('<foo></foo>'))), '<div><foo></foo></div>');

@@ -45,0 +51,0 @@ t.equal(render(m('div', '<foo></foo>')), '<div>&lt;foo&gt;&lt;/foo&gt;</div>');

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