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

hast-util-to-dom

Package Overview
Dependencies
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hast-util-to-dom - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

33

dist/hast-util-to-dom.js
'use strict';
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var ns = require('web-namespaces');
var find = require('property-information/find');
var html = require('property-information/html');
var svg = require('property-information/svg');
var ns = _interopDefault(require('web-namespaces'));
var find = _interopDefault(require('property-information/find'));
var html = _interopDefault(require('property-information/html'));
var svg = _interopDefault(require('property-information/svg'));
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var ns__default = /*#__PURE__*/_interopDefaultLegacy(ns);
var find__default = /*#__PURE__*/_interopDefaultLegacy(find);
var html__default = /*#__PURE__*/_interopDefaultLegacy(html);
var svg__default = /*#__PURE__*/_interopDefaultLegacy(svg);
function _defineProperty(obj, key, value) {

@@ -103,3 +108,3 @@ if (key in obj) {

if (typeof optionsNamespace === 'undefined') {
namespace = properties.xmlns || ns.html;
namespace = properties.xmlns || ns__default['default'].html;
}

@@ -120,3 +125,3 @@ }

return appendAll(el, children, _objectSpread2({}, options, {
return appendAll(el, children, _objectSpread2(_objectSpread2({}, options), {}, {
fragment: fragment,

@@ -152,3 +157,3 @@ namespace: namespace,

var _node$tagName = node.tagName,
tagName = _node$tagName === void 0 ? impliedNamespace === ns.svg ? 'g' : 'div' : _node$tagName,
tagName = _node$tagName === void 0 ? impliedNamespace === ns__default['default'].svg ? 'g' : 'div' : _node$tagName,
_node$properties = node.properties,

@@ -159,7 +164,7 @@ properties = _node$properties === void 0 ? {} : _node$properties,

if ((impliedNamespace === null || impliedNamespace === undefined || impliedNamespace === ns.html) && tagName === 'svg') {
impliedNamespace = ns.svg;
if ((impliedNamespace === null || impliedNamespace === undefined || impliedNamespace === ns__default['default'].html) && tagName === 'svg') {
impliedNamespace = ns__default['default'].svg;
}
var schema = impliedNamespace === ns.svg ? svg : html;
var schema = impliedNamespace === ns__default['default'].svg ? svg__default['default'] : html__default['default'];
var el = impliedNamespace === null || impliedNamespace === undefined ? doc.createElement(tagName) : doc.createElementNS(impliedNamespace, tagName); // Add HTML attributes.

@@ -173,3 +178,3 @@

var _find = find(schema, key),
var _find = find__default['default'](schema, key),
attribute = _find.attribute,

@@ -208,3 +213,3 @@ property = _find.property,

return appendAll(el, children, _objectSpread2({}, options, {
return appendAll(el, children, _objectSpread2(_objectSpread2({}, options), {}, {
impliedNamespace: impliedNamespace

@@ -227,3 +232,3 @@ }));

var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
return transform(hast, _objectSpread2({}, options, {
return transform(hast, _objectSpread2(_objectSpread2({}, options), {}, {
doc: options.document || document

@@ -230,0 +235,0 @@ }));

{
"name": "hast-util-to-dom",
"version": "2.0.5",
"version": "2.0.6",
"description": "hast utility to transform to the DOM",

@@ -37,29 +37,28 @@ "license": "ISC",

"devDependencies": {
"@babel/core": "^7.4.5",
"@babel/core": "^7.0.0",
"@babel/plugin-external-helpers": "^7.0.0",
"@babel/preset-env": "^7.4.5",
"babel-core": "^7.0.0-bridge.0",
"@babel/preset-env": "^7.0.0",
"@rollup/plugin-babel": "^5.0.0",
"@rollup/plugin-commonjs": "^15.0.0",
"@rollup/plugin-json": "^4.0.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"babel-eslint": "^10.0.0",
"babel-jest": "^25.0.0",
"eslint": "^6.0.0",
"babel-jest": "^26.0.0",
"eslint": "^7.0.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-import": "^2.0.0",
"glob": "^7.0.0",
"hastscript": "^5.0.0",
"hastscript": "^6.0.0",
"jasmine-core": "^3.0.0",
"jest-cli": "^25.0.0",
"karma": "^4.0.0",
"jest-cli": "^26.0.0",
"karma": "^5.0.0",
"karma-chrome-launcher": "^3.0.0",
"karma-firefox-launcher": "^1.0.0",
"karma-jasmine": "^3.0.0",
"karma-jasmine": "^4.0.0",
"karma-mocha-reporter": "^2.0.0",
"karma-rollup-preprocessor": "^7.0.0",
"karma-safari-launcher": "^1.0.0",
"remark-cli": "^7.0.0",
"remark-preset-wooorm": "^6.0.0",
"rollup": "^1.0.0",
"rollup-plugin-babel": "^4.0.1",
"rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^5.0.0",
"remark-cli": "^8.0.0",
"remark-preset-wooorm": "^7.0.0",
"rollup": "^2.0.0",
"w3c-xmlserializer": "^2.0.0"

@@ -70,3 +69,3 @@ },

"build": "rollup -c",
"lint": "remark . -qfo && eslint .",
"lint": "remark . -qfo && eslint . --fix",
"test": "jest",

@@ -73,0 +72,0 @@ "test:karma": "karma start --single-run --browsers ChromeHeadless,FirefoxHeadless,Safari karma.conf.js",

@@ -144,5 +144,5 @@ # hast-util-to-dom

[chat-badge]: https://img.shields.io/badge/chat-spectrum-7b16ff.svg
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://spectrum.chat/unified/syntax-tree
[chat]: https://github.com/syntax-tree/unist/discussions

@@ -157,7 +157,7 @@ [yarn]: https://yarnpkg.com/lang/en/docs/install

[contributing]: https://github.com/syntax-tree/.github/blob/master/contributing.md
[contributing]: https://github.com/syntax-tree/.github/blob/HEAD/contributing.md
[support]: https://github.com/syntax-tree/.github/blob/master/support.md
[support]: https://github.com/syntax-tree/.github/blob/HEAD/support.md
[coc]: https://github.com/syntax-tree/.github/blob/master/code-of-conduct.md
[coc]: https://github.com/syntax-tree/.github/blob/HEAD/code-of-conduct.md

@@ -164,0 +164,0 @@ [hast]: https://github.com/syntax-tree/hast

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