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 1.0.1-3 to 1.0.1-4

3

index.js

@@ -160,2 +160,3 @@ 'use strict'

state: copy(component),
children: copy(view.children),
attrs: view.attrs || {}

@@ -167,2 +168,3 @@ }

state: copy(component),
children: copy(view.children),
attrs: options.attrs || {}

@@ -180,2 +182,3 @@ }

state: copy(view.tag),
children: copy(view.children),
attrs: view.attrs

@@ -182,0 +185,0 @@ }

2

package.json
{
"name": "mithril-node-render",
"version": "1.0.1-3",
"version": "1.0.1-4",
"description": "Node rending of mithril views",

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

@@ -90,2 +90,19 @@ 'use strict'

})
o('with children', function() {
var parentComponent = {
view: function(node) {
return m('div', node.children)
}
}
o(render(m(parentComponent, 'howdy'))).equals('<div>howdy</div>')
o(render(m(parentComponent, m('span', 'howdy')))).equals('<div><span>howdy</span></div>')
o(render(m(parentComponent, [
m('span', 'foo'),
m('span', 'bar')
]))).equals('<div><span>foo</span><span>bar</span></div>')
o(render(m(parentComponent, m.trust('<span>trust me</span>')))).equals('<div><span>trust me</span></div>')
o(render(m(parentComponent, m(myComponent, { foo: 'foz' })))).equals('<div><div>hellobarfoz</div></div>')
})
})

@@ -92,0 +109,0 @@

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