mithril-node-render
Advanced tools
Comparing version 0.3.3 to 0.4.0
'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 @@ } |
{ | ||
"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><foo></foo></div>'); |
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
8697
185