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

jsx-dom-runtime

Package Overview
Dependencies
Maintainers
1
Versions
109
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsx-dom-runtime - npm Package Compare versions

Comparing version 0.67.3 to 0.68.0

22

jsx-runtime/index.js

@@ -7,7 +7,7 @@ const svgNs = 'http://www.w3.org/2000/svg';

const extensions = new Map([['style', (node, value, key) => {
if ('string' === typeof value) {
if ('string' == typeof value) {
node.setAttribute(key, value);
} else {
for (key in value) {
if (key.startsWith('--')) {
if (key.startsWith('-')) {
node.style.setProperty(key, value[key]);

@@ -38,3 +38,5 @@ } else {

value,
node = props._ ? document.createElementNS(props._, tag) : document.createElement(tag);
node = props._ ? document.createElementNS(props._, tag) : document.createElement(tag, props.is ? {
is: props.is
} : key);
for (key in props) {

@@ -47,12 +49,14 @@ if (!internalKeys.has(key)) {

node[key] = value;
} else if (null != value && ('boolean' !== typeof value || '-' === key[4])) {
node.setAttribute(key, value);
} else if (value) {
node.setAttribute(key, '');
} else if (null != value) {
if ('boolean' != typeof value || key.startsWith('-', 4)) {
node.setAttribute(key, value);
} else if (value) {
node.setAttribute(key, '');
}
}
}
}
appendChildren(props.children, 'template' === tag ? node.content : node);
appendChildren(props.children, 'template' == tag ? node.content : node);
if (value = props.ref) {
if ('function' === typeof value) {
if ('function' == typeof value) {
value(node);

@@ -59,0 +63,0 @@ } else {

{
"name": "jsx-dom-runtime",
"version": "0.67.3",
"version": "0.68.0",
"description": "A tiny in 500 bytes library to JSX syntax templates for DOM. Support HTML, SVG and MathML tags",

@@ -40,3 +40,3 @@ "type": "module",

"devDependencies": {
"@babel/core": "^7.24.4",
"@babel/core": "^7.24.5",
"@babel/preset-typescript": "^7.24.1",

@@ -52,4 +52,4 @@ "@evilmartians/lefthook": "^1.6.10",

"@types/jest": "^29.5.12",
"@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.7.1",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"babel-jest": "^29.7.0",

@@ -60,3 +60,3 @@ "babel-plugin-transform-lhs-constants": "^1.2.0",

"jest-environment-jsdom": "^29.7.0",
"rollup": "^4.17.0",
"rollup": "^4.17.2",
"size-limit": "^11.1.2",

@@ -63,0 +63,0 @@ "typescript": "^5.4.5"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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