Socket
Socket
Sign inDemoInstall

@thi.ng/hiccup

Package Overview
Dependencies
Maintainers
1
Versions
254
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@thi.ng/hiccup - npm Package Compare versions

Comparing version 1.2.5 to 1.3.0

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

<a name="1.3.0"></a>
# [1.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup@1.2.5...@thi.ng/hiccup@1.3.0) (2018-03-21)
### Features
* **hiccup:** update error handling, add [@thi](https://github.com/thi).ng/api dep ([a3238ab](https://github.com/thi-ng/umbrella/commit/a3238ab))
<a name="1.2.5"></a>

@@ -8,0 +19,0 @@ ## [1.2.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup@1.2.4...@thi.ng/hiccup@1.2.5) (2018-03-18)

5

package.json
{
"name": "@thi.ng/hiccup",
"version": "1.2.5",
"version": "1.3.0",
"description": "HTML/SVG/XML serialization of nested data structures, iterables & closures",

@@ -19,3 +19,3 @@ "main": "./index.js",

"devDependencies": {
"@thi.ng/atom": "^1.1.0",
"@thi.ng/atom": "^1.2.0",
"@types/mocha": "^2.2.48",

@@ -31,2 +31,3 @@ "@types/node": "^9.4.6",

"dependencies": {
"@thi.ng/api": "^2.1.0",
"@thi.ng/checks": "^1.3.0"

@@ -33,0 +34,0 @@ },

7

serialize.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const error_1 = require("@thi.ng/api/error");
const implements_function_1 = require("@thi.ng/checks/implements-function");

@@ -116,3 +117,3 @@ const is_plain_object_1 = require("@thi.ng/checks/is-plain-object");

if (api_1.VOID_TAGS[tag]) {
throw new Error(`No body allowed in tag: ${tag}`);
error_1.illegalArgs(`No body allowed in tag: ${tag}`);
}

@@ -133,3 +134,3 @@ res += ">";

}
throw new Error(`invalid tree node: ${tree}`);
error_1.illegalArgs(`invalid tree node: ${tree}`);
}

@@ -158,3 +159,3 @@ if (is_function_1.isFunction(tree)) {

if (!is_string_1.isString(el) || !(match = api_1.TAG_REGEXP.exec(el))) {
throw new Error(`"${el}" is not a valid tag name`);
error_1.illegalArgs(`"${el}" is not a valid tag name`);
}

@@ -161,0 +162,0 @@ el = match[1];

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