Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

magic-virtual-element

Package Overview
Dependencies
6
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

8

index.js

@@ -5,4 +5,12 @@ var toStyle = require('to-style').string

var type = require('component-type')
var slice = require('sliced')
module.exports = function (t, attributes, children) {
// Account for JSX putting the children as multiple arguments.
// This is essentially just the ES6 rest param
if (arguments.length > 2 && Array.isArray(arguments[2]) === false) {
children = slice(arguments, 2)
}
var node = element(t, attributes, children)

@@ -9,0 +17,0 @@

3

package.json
{
"name": "magic-virtual-element",
"version": "1.0.1",
"version": "1.0.2",
"repository": "dekujs/magic-virtual-element",

@@ -20,2 +20,3 @@ "description": "Build virtual tree elements with magic attributes",

"component-type": "^1.1.0",
"sliced": "^1.0.1",
"to-style": "^1.3.3",

@@ -22,0 +23,0 @@ "virtual-element": "^1.1.0"

@@ -8,3 +8,3 @@ /**

test('magic attributes', ({ equal, end, ok }) => {
test('magic attributes', ({equal, end, ok}) => {
var node

@@ -37,2 +37,10 @@

ok(node.attributes.style === 'border-width: 1px')
})
test.only('jsx compatiblity', ({equal, end}) => {
var child1 = element('div')
var child2 = element('div')
var node = element('div', null, child1, child2)
equal(node.children.length,2, 'children are spread')
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