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 5.1.30 to 5.2.0

8

CHANGELOG.md
# Change Log
- **Last updated**: 2024-04-23T07:02:18Z
- **Last updated**: 2024-04-25T19:44:55Z
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)

@@ -12,2 +12,8 @@

## [5.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup@5.2.0) (2024-04-25)
#### 🚀 Features
- add `SerializeOpts.xml`, update serializeAttrib ([8fdcab9](https://github.com/thi-ng/umbrella/commit/8fdcab9))
### [5.1.29](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup@5.1.29) (2024-04-20)

@@ -14,0 +20,0 @@

4

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

@@ -131,3 +131,3 @@ "type": "module",

},
"gitHead": "5dd66c18a3862a3af69a5b2f49563f7cbdd960c2\n"
"gitHead": "aed3421c21044c005fbcb7cc37965ccf85a870d2\n"
}

@@ -186,3 +186,3 @@ <!-- This file is generated - DO NOT EDIT! -->

Package sizes (brotli'd, pre-treeshake): ESM: 2.17 KB
Package sizes (brotli'd, pre-treeshake): ESM: 2.19 KB

@@ -189,0 +189,0 @@ ## Dependencies

@@ -39,2 +39,14 @@ import type { FnU } from "@thi.ng/api";

keys: boolean;
/**
* If true, some serialization behaviors will be adjusted to target XML
* output.
*
* @remarks
* Currently, the following aspects are supported:
*
* - boolean attributes are serialized as `name=""` rather than just `name`
*
* @defaultValue false
*/
xml: boolean;
}

@@ -41,0 +53,0 @@ /**

@@ -26,4 +26,5 @@ import { deref, isDeref } from "@thi.ng/api/deref";

escapeFn: escapeEntitiesNum,
keys: false,
span: false,
keys: false,
xml: false,
...opts

@@ -65,3 +66,3 @@ };

const serializeAttrib = (attribs, a, v, opts) => {
return v == null ? null : isFunction(v) && (/^on\w+/.test(a) || (v = v(attribs)) == null) ? null : v === true ? " " + a : v === false ? null : a === "data" ? serializeDataAttribs(v, opts) : attribPair(a, v, opts);
return v == null ? null : isFunction(v) && (/^on\w+/.test(a) || (v = v(attribs)) == null) ? null : v === true ? " " + a + (opts.xml ? `=""` : "") : v === false ? null : a === "data" ? serializeDataAttribs(v, opts) : attribPair(a, v, opts);
};

@@ -68,0 +69,0 @@ const attribPair = (a, v, opts) => {

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