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

hjsx

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hjsx - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

34

hjsx.js

@@ -163,2 +163,19 @@ // util/normalize-attribute-name.ts

// hjsx.ts
function hjsx(type, props, children) {
return {
type,
props,
children,
render() {
return renderToString(this);
},
$$typeof: Symbol.for("hjsx.element"),
key: null,
ref: null,
_owner: null
};
}
function fragment({ children }) {
return children;
}
var validateElement = function(element) {

@@ -193,17 +210,2 @@ if (!isObject(element)) {

];
var hjsx = (type, props, children) => {
return {
type,
props,
children,
render() {
return renderToString(this);
},
$$typeof: Symbol.for("hjsx.element"),
key: null,
ref: null,
_owner: null
};
};
var fragment = ({ children }) => children;
var renderToString = (component) => {

@@ -249,2 +251,4 @@ if (isPrimitive(component))

};
globalThis.hjsx = hjsx;
globalThis.fragment = fragment;
export {

@@ -251,0 +255,0 @@ renderToString,

import {
uuid,
escapeHtml,

@@ -33,7 +32,7 @@ normalizeAttributeName,

export const hjsx = (
export function hjsx(
type: hjsx.Element["type"],
props?: hjsx.Element["props"],
props?: Record<PropertyKey, unknown>,
children?: hjsx.Node,
) => {
) {
return {

@@ -51,5 +50,7 @@ type,

};
};
}
export const fragment: (props: RenderProps) => hjsx.Node = ({ children }: RenderProps) => children;
export function fragment({ children }: hjsx.RenderProps) {
return children;
}

@@ -126,1 +127,5 @@ // Refactored to use functional programming style

}
// set globals
globalThis.hjsx = hjsx;
globalThis.fragment = fragment;
{
"name": "hjsx",
"version": "0.1.1",
"version": "0.1.2",
"module": "hjsx.ts",
"main": "hjsx.js",
"type": "module",
"types": "types.d.ts",
"types": "hjsx.d.ts",
"scripts": {

@@ -9,0 +9,0 @@ "build": "bun build hjsx.ts --outfile hjsx.js --target node",

Sorry, the diff of this file is not supported yet

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

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