Socket
Socket
Sign inDemoInstall

@podium/utils

Package Overview
Dependencies
Maintainers
5
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@podium/utils - npm Package Compare versions

Comparing version 4.0.0-next.1 to 4.0.0-next.2

28

lib/utils.js

@@ -253,5 +253,18 @@ 'use strict';

title = '',
js = '',
css = '',
} = {}) => `<!doctype html>
js = [],
css = [],
} = {}) => {
let scripts = js;
let styles = css;
const buildScriptTag = ({ value = '' }) =>
`<script src="${value}" defer></script>`;
const buildCSSLinkTag = ({ value = '' }) =>
`<link rel="stylesheet" type="text/css" href="${value}">`;
// backwards compatibility for scripts and styles
if (typeof js === 'string') scripts = [{ type: 'default', value: js }];
if (typeof css === 'string') styles = [{ type: 'default', value: css }];
return `<!doctype html>
<html lang="${locale}">

@@ -262,8 +275,4 @@ <head>

<meta http-equiv="X-UA-Compatible" content="IE=Edge">
${js ? `<script src="${js}" defer></script>` : ''}
${
css
? `<link media="all" rel="stylesheet" type="text/css" href="${css}">`
: ''
}
${styles.map(buildCSSLinkTag).join('\n ')}
${scripts.map(buildScriptTag).join('\n ')}
<title>${title}</title>

@@ -276,2 +285,3 @@ ${head}

</html>`;
};

@@ -278,0 +288,0 @@ module.exports.isString = isString;

{
"name": "@podium/utils",
"version": "4.0.0-next.1",
"version": "4.0.0-next.2",
"description": "Common generic utility methods shared by @podium modules.",

@@ -5,0 +5,0 @@ "license": "MIT",

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