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

hyperx-to-snabbdom

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperx-to-snabbdom - npm Package Compare versions

Comparing version 0.2.4 to 0.3.0

34

index.js

@@ -33,4 +33,7 @@ module.exports = function (h) {

} else {
data.props[key] = data.attrs[key] = value === "true"
? true : value === "false" ? false : value
if (isSVG(tagName)) {
data.attrs[key] = parseBool(value)
continue
}
data.props[key] = data.attrs[key] = parseBool(value)
}

@@ -42,1 +45,28 @@ }

}
function parseBool(value) {
return value === "true" ? true : value === "false" ? false : value
}
function isSVG(tagName) {
var svgTags = [
"svg", "animate", "animateTransform", "circle", "cursor", "desc", "ellipse",
"feBlend", "feColorMatrix", "feComposite",
"feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap",
"feDistantLight", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR",
"feGaussianBlur", "feImage", "feMergeNode", "feMorphology",
"feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile",
"feTurbulence", "font-face-format", "font-face-name", "font-face-uri",
"glyph", "glyphRef", "hkern", "image", "line", "missing-glyph", "mpath",
"path", "polygon", "polyline", "rect", "set", "stop", "tref", "use", "view",
"vkern"
]
for (var i = 0; i < svgTags.length; i++) {
if (tagName === svgTags[i]) {
return true
}
}
return false
}

2

package.json
{
"name": "hyperx-to-snabbdom",
"version": "0.2.4",
"version": "0.3.0",
"description": "Hyperx to Snabbdom transform function.",

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

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