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

jsx-dom

Package Overview
Dependencies
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsx-dom - npm Package Compare versions

Comparing version 5.2.0 to 6.1.0

.vscode/settings.json

9

CHANGELOG.md

@@ -0,1 +1,7 @@

# 6.0.0
- Deprecates undocumented `DOM` shortcut functions.
# 5.2.0
- Fixes a bug with xlink attributes for SVG elements.
# 5.1.6

@@ -17,7 +23,6 @@ - Fixes a bug where `null`y value gets passed to dataset.

# 5.0.2
- Attribute is now optional for `DOM` shortcut functions.
- ~~Attribute is now optional for `DOM` shortcut functions.~~
- Added more tests.
# 5.0.0
- **Breaking Change:** SVG support is now migrated to a dedicated file.

@@ -35,53 +35,2 @@ "use strict";

function f(tag) {
return function(attr) {
var children = [];
for (var _i = 1; _i < arguments.length; _i++) {
children[_i - 1] = arguments[_i];
}
if (isElement(attr) || isString(attr)) {
children.unshift(attr);
attr = {};
}
return createElement(tag, attr, children);
};
}
/** @type {any} */
var DOM = (function(obj) {
for (var _i = 0, _a = keys(obj); _i < _a.length; _i++) {
var key = _a[_i];
obj[key] = f(key);
}
return obj;
})({
a: 0,
blockquote: 0,
button: 0,
div: 0,
em: 0,
form: 0,
h1: 0,
h2: 0,
h3: 0,
h4: 0,
h5: 0,
h6: 0,
hr: 0,
img: 0,
input: 0,
li: 0,
link: 0,
ol: 0,
p: 0,
script: 0,
span: 0,
strong: 0,
table: 0,
td: 0,
th: 0,
thead: 0,
tr: 0,
ul: 0
});
var SVGNamespace = "http://www.w3.org/2000/svg";

@@ -123,2 +72,7 @@ function preventDefault(event) {

}
function Fragment(attr) {
var fragment = document.createDocumentFragment();
appendChildren(attr.children, fragment);
return fragment;
}
function createElement(tag, attr) {

@@ -222,4 +176,4 @@ var children = [];

exports.stopPropagation = stopPropagation;
exports.Fragment = Fragment;
exports.h = createElement;
exports.createElement = createElement;
exports.DOM = DOM;

@@ -31,53 +31,2 @@ import { __assign } from "tslib";

function f(tag) {
return function(attr) {
var children = [];
for (var _i = 1; _i < arguments.length; _i++) {
children[_i - 1] = arguments[_i];
}
if (isElement(attr) || isString(attr)) {
children.unshift(attr);
attr = {};
}
return createElement(tag, attr, children);
};
}
/** @type {any} */
var DOM = (function(obj) {
for (var _i = 0, _a = keys(obj); _i < _a.length; _i++) {
var key = _a[_i];
obj[key] = f(key);
}
return obj;
})({
a: 0,
blockquote: 0,
button: 0,
div: 0,
em: 0,
form: 0,
h1: 0,
h2: 0,
h3: 0,
h4: 0,
h5: 0,
h6: 0,
hr: 0,
img: 0,
input: 0,
li: 0,
link: 0,
ol: 0,
p: 0,
script: 0,
span: 0,
strong: 0,
table: 0,
td: 0,
th: 0,
thead: 0,
tr: 0,
ul: 0
});
var SVGNamespace = "http://www.w3.org/2000/svg";

@@ -119,2 +68,7 @@ function preventDefault(event) {

}
function Fragment(attr) {
var fragment = document.createDocumentFragment();
appendChildren(attr.children, fragment);
return fragment;
}
function createElement(tag, attr) {

@@ -219,5 +173,5 @@ var children = [];

stopPropagation,
Fragment,
createElement as h,
createElement,
DOM
createElement
};
{
"name": "jsx-dom",
"version": "5.2.0",
"version": "6.1.0",
"description": "JSX to document.createElement.",

@@ -23,18 +23,18 @@ "main": "index.cjs.js",

"@types/babel-core": "^6.25.3",
"@types/chai": "^4.0.4",
"@types/jsdom": "^11.0.3",
"@types/mocha": "^2.2.44",
"@types/node": "^8.0.50",
"@types/chai": "^4.1.2",
"@types/jsdom": "^11.0.4",
"@types/mocha": "^2.2.48",
"@types/node": "^9.4.6",
"babel-core": "^6.26.0",
"babel-preset-minify": "^0.2.0",
"babel-preset-minify": "^0.3.0",
"chai": "^4.1.2",
"coffeescript": "^2.0.2",
"jsdom": "^11.3.0",
"mocha": "^4.0.1",
"nyc": "^11.3.0",
"rollup": "^0.51.1",
"rollup-plugin-prettier": "^0.3.0",
"coffeescript": "^2.2.2",
"jsdom": "^11.6.2",
"mocha": "^5.0.2",
"nyc": "^11.4.1",
"rollup": "^0.56.4",
"rollup-plugin-prettier": "^0.4.0",
"rollup-plugin-replace": "^2.0.0",
"ts-node": "^3.3.0",
"typescript": "^2.6.1"
"ts-node": "^5.0.1",
"typescript": "^2.7.2"
},

@@ -50,4 +50,4 @@ "repository": {

"dependencies": {
"tslib": "^1.8.0"
"tslib": "^1.9.0"
}
}

@@ -20,5 +20,5 @@ # jsx-dom

**Note:** If you are coming from a previous version and are using `createElement` instead of `h`, no change is necessary as both of them will continue to work.
**Note:** If you need JSX.Fragment support in TypeScript, you must `import` the entire library as `React` namespace because of TypeScript restrictions.
You need to tell your transpiler to use the name `h`. If you prefer not to, skip to the next section for instructions. For Babel users, specify within your `.babelrc`:
You need to tell your transpiler to use the name `h`. If you prefer not to, or you need to use JSX.Fragment, skip to the next section for instructions. For Babel users, specify within your `.babelrc`:

@@ -124,1 +124,6 @@ ```js

`jsx-dom` requires `Object.keys` and `Object.create` support. This means IE9 or later.
## Known Issues
`<div />`, and other tags, are inferred as a general `JSX.Element` in TypeScript instead of
`HTMLDivElement` (or the equivalents). This is a known bug and its fix depends on [TypeScript#21699](https://github.com/Microsoft/TypeScript/issues/21699).

@@ -35,53 +35,2 @@ "use strict";

function f(tag) {
return function(attr) {
var children = [];
for (var _i = 1; _i < arguments.length; _i++) {
children[_i - 1] = arguments[_i];
}
if (isElement(attr) || isString(attr)) {
children.unshift(attr);
attr = {};
}
return createElement(tag, attr, children);
};
}
/** @type {any} */
var DOM = (function(obj) {
for (var _i = 0, _a = keys(obj); _i < _a.length; _i++) {
var key = _a[_i];
obj[key] = f(key);
}
return obj;
})({
a: 0,
blockquote: 0,
button: 0,
div: 0,
em: 0,
form: 0,
h1: 0,
h2: 0,
h3: 0,
h4: 0,
h5: 0,
h6: 0,
hr: 0,
img: 0,
input: 0,
li: 0,
link: 0,
ol: 0,
p: 0,
script: 0,
span: 0,
strong: 0,
table: 0,
td: 0,
th: 0,
thead: 0,
tr: 0,
ul: 0
});
var SVGNamespace = "http://www.w3.org/2000/svg";

@@ -181,2 +130,7 @@ var XLinkNamespace = "http://www.w3.org/1999/xlink";

};
function Fragment(attr) {
var fragment = document.createDocumentFragment();
appendChildren(attr.children, fragment);
return fragment;
}
function createElement(tag, attr) {

@@ -225,7 +179,7 @@ var children = [];

}
var normalizeAttribute = function(s) {
function normalizeAttribute(s) {
return s.replace(/[A-Z\d]/g, function(match) {
return ":" + match.toLowerCase();
});
};
}
function attribute(key, value, node) {

@@ -310,4 +264,4 @@ {

exports.stopPropagation = stopPropagation;
exports.Fragment = Fragment;
exports.h = createElement;
exports.createElement = createElement;
exports.DOM = DOM;

@@ -31,53 +31,2 @@ import { __assign } from "tslib";

function f(tag) {
return function(attr) {
var children = [];
for (var _i = 1; _i < arguments.length; _i++) {
children[_i - 1] = arguments[_i];
}
if (isElement(attr) || isString(attr)) {
children.unshift(attr);
attr = {};
}
return createElement(tag, attr, children);
};
}
/** @type {any} */
var DOM = (function(obj) {
for (var _i = 0, _a = keys(obj); _i < _a.length; _i++) {
var key = _a[_i];
obj[key] = f(key);
}
return obj;
})({
a: 0,
blockquote: 0,
button: 0,
div: 0,
em: 0,
form: 0,
h1: 0,
h2: 0,
h3: 0,
h4: 0,
h5: 0,
h6: 0,
hr: 0,
img: 0,
input: 0,
li: 0,
link: 0,
ol: 0,
p: 0,
script: 0,
span: 0,
strong: 0,
table: 0,
td: 0,
th: 0,
thead: 0,
tr: 0,
ul: 0
});
var SVGNamespace = "http://www.w3.org/2000/svg";

@@ -177,2 +126,7 @@ var XLinkNamespace = "http://www.w3.org/1999/xlink";

};
function Fragment(attr) {
var fragment = document.createDocumentFragment();
appendChildren(attr.children, fragment);
return fragment;
}
function createElement(tag, attr) {

@@ -221,7 +175,7 @@ var children = [];

}
var normalizeAttribute = function(s) {
function normalizeAttribute(s) {
return s.replace(/[A-Z\d]/g, function(match) {
return ":" + match.toLowerCase();
});
};
}
function attribute(key, value, node) {

@@ -307,5 +261,5 @@ {

stopPropagation,
Fragment,
createElement as h,
createElement,
DOM
createElement
};

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