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

@ekino/rendr-core

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ekino/rendr-core - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

README.md

41

dist/lib/index.js
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
function __export(m) {

@@ -12,2 +23,3 @@ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];

__export(require("./types"));
__export(require("./errors"));
function isObject(data) {

@@ -100,7 +112,8 @@ return data !== null && typeof data === "object";

page.template = "template" in data ? data.template : "default";
page.id = "id" in data ? data.template : "id";
page.id = "id" in data ? data.id : "id";
page.cache = normalizeCache(data.cache);
page.head = normalizeHead(data.head);
page.blocks = normalizeBlockDefinitions(data.blocks);
page.settings = "settings" in data ? data.settings : [];
page.settings = "settings" in data && isObject(data.settings) ? data.settings : {};
page.path = "path" in data ? data.path : "";
return page;

@@ -114,2 +127,3 @@ }

var ctx = {
hostname: url.hostname,
pathname: url.pathname,

@@ -127,2 +141,25 @@ query: url.query,

exports.createContext = createContext;
function mergePages(pages) {
var page = new types_1.Page();
pages.forEach(function (p) {
page.cache.ttl = p.cache.ttl;
page.head = {
titleTemplate: p.head.titleTemplate.length > 0 ? p.head.titleTemplate : page.head.titleTemplate,
defaultTitle: p.head.defaultTitle.length > 0 ? p.head.defaultTitle : page.head.defaultTitle,
title: p.head.title.length > 0 ? p.head.title : page.head.title,
link: p.head.link.length > 0 ? p.head.link : page.head.link,
htmlAttributes: Object.keys(p.head.htmlAttributes).length > 0 ? p.head.htmlAttributes : page.head.htmlAttributes,
meta: page.head.meta.concat(p.head.meta),
};
page.path = p.path;
page.template = p.template.length > 0 ? p.template : page.template;
page.type = p.type.length > 0 ? p.type : page.type;
page.id = p.id;
page.statusCode = p.statusCode;
page.settings = __assign({}, page.settings, p.settings);
page.blocks = page.blocks.concat(p.blocks);
});
return page;
}
exports.mergePages = mergePages;
//# sourceMappingURL=index.js.map

4

package.json
{
"name": "@ekino/rendr-core",
"license": "MIT",
"version": "0.0.5",
"version": "0.0.6",
"main": "dist/lib/index.js",

@@ -25,3 +25,3 @@ "typing": "dist/lib/index.d.ts",

},
"gitHead": "e0cc2f1ec7ac893f0c887530133a801be4cc225f"
"gitHead": "f076cb1668c97b27aa696a5c1bf6a0c35cb1c850"
}
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