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.1.3 to 1.2.0

12

CHANGELOG.md

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

<a name="1.2.0"></a>
# [1.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup@1.1.3...@thi.ng/hiccup@1.2.0) (2018-03-14)
### Features
* **hiccup:** add auto deref() support ([0d2c16f](https://github.com/thi-ng/umbrella/commit/0d2c16f))
* **hiccup:** support fn values in style objects ([93343d6](https://github.com/thi-ng/umbrella/commit/93343d6))
<a name="1.1.3"></a>

@@ -8,0 +20,0 @@ ## [1.1.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup@1.1.2...@thi.ng/hiccup@1.1.3) (2018-03-08)

7

css.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const is_function_1 = require("@thi.ng/checks/is-function");
exports.css = (rules) => {

@@ -7,3 +8,7 @@ const css = [];

if (rules.hasOwnProperty(r)) {
css.push(r + ":" + rules[r] + ";");
let v = rules[r];
if (is_function_1.isFunction(v)) {
v = v(rules);
}
css.push(r + ":" + v + ";");
}

@@ -10,0 +15,0 @@ }

3

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

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

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

@@ -21,0 +22,0 @@ "@types/node": "^9.4.6",

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const implements_function_1 = require("@thi.ng/checks/implements-function");
const is_plain_object_1 = require("@thi.ng/checks/is-plain-object");

@@ -136,2 +137,5 @@ const is_function_1 = require("@thi.ng/checks/is-function");

}
if (implements_function_1.implementsFunction(tree, "deref")) {
return _serialize(tree.deref(), esc);
}
if (iter(tree)) {

@@ -166,4 +170,5 @@ return _serializeIter(tree, esc);

let i = 1;
if (is_plain_object_1.isPlainObject(tag[1])) {
Object.assign(attribs, tag[1]);
const att = tag[1];
if (is_plain_object_1.isPlainObject(att) && !implements_function_1.implementsFunction(att, "deref")) {
Object.assign(attribs, att);
i++;

@@ -170,0 +175,0 @@ }

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