You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

jsx-async-runtime

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsx-async-runtime - npm Package Compare versions

Comparing version

to
1.0.1

8

dist/esm/index.js

@@ -76,3 +76,3 @@ // src/jsx/jsx-runtime.ts

case "class":
const classes = Array.isArray(value) ? value.filter((v) => v) : Object.entries(value).filter(([k, v]) => v).map(([k, v]) => k);
const classes = Array.isArray(value) ? value.filter((v) => v) : Object.entries(value).filter(([_, v]) => v).map(([k]) => k);
return classes.length > 0 ? `class="${escapeQuotes(classes.join(" "))}"` : "";

@@ -171,10 +171,10 @@ default:

}
const children = [];
const result = [];
for (const child of element.children) {
const str = await $jsxToString.call(this, child);
if (str.length > 0) {
children.push(str);
result.push(str);
}
}
return `<${element.tag}${separator}${attributes}>${children.join("")}</${element.tag}>`;
return `<${element.tag}${separator}${attributes}>${result.join("")}</${element.tag}>`;
}

@@ -181,0 +181,0 @@ }

{
"name": "jsx-async-runtime",
"version": "1.0.0",
"version": "1.0.1",
"description": "An asynchronous JSX runtime without dependencies to be used as html template engine.",

@@ -43,12 +43,12 @@ "keywords": [

"scripts": {
"start": "nodemon -w src -e 'js,jsx,ts,tsx' --exec npm run build",
"build": "rm -r dist ; npm run build:types && npm run build:esm",
"start": "npm run build:esm -- --watch",
"build": "npm run build:types && npm run build:esm",
"build:esm": "esbuild --platform=neutral --format=esm --outdir=./dist/esm --bundle ./src/*.ts",
"build:types": "tsc --emitDeclarationOnly --outDir ./dist/types"
"build:types": "tsc --emitDeclarationOnly --outDir ./dist/types",
"clean": "rm -rf dist"
},
"devDependencies": {
"esbuild": "0.25.1",
"nodemon": "3.1.9",
"typescript": "5.8.2"
"esbuild": "0.25.3",
"typescript": "5.8.3"
}
}