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

hlx-util

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hlx-util - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

2

package.json
{
"name": "hlx-util",
"version": "0.0.8",
"version": "0.0.9",
"description": "A library to preserve functions commonly used in hlxjs project",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -96,2 +96,5 @@ const {URL} = require('url');

obj.hash = '';
if (obj.hostname && base && !obj.pathname.startsWith(obj.hostname, 1)) {
obj.pathname = path.join('/', obj.hostname, obj.pathname);
}
}

@@ -122,15 +125,10 @@ return obj;

const obj = buildUrlObj(uri, parentUri);
if (!obj) {
localPath = buildAbsolutePath(uri, parentUri, inputDir, outputDir);
print(`\tFrom relative path to localPath: ${localPath}`);
return removeQueryString(localPath);
if (obj) {
localPath = buildAbsolutePath(obj.pathname, '/', inputDir, outputDir);
print(`\tFrom absolute url to localPath: ${localPath}`);
return localPath;
}
const parentObj = buildUrlObj(parentUri);
let basePath = `${obj.hostname}/.`;
if (!parentUri || (obj.protocol === parentObj.protocol && obj.hostname === parentObj.hostname)) {
basePath = '/.';
}
localPath = buildAbsolutePath(obj.pathname, basePath, inputDir, outputDir);
print(`\tFrom absolute url to localPath: ${localPath}`);
return localPath;
localPath = buildAbsolutePath(uri, parentUri, inputDir, outputDir);
print(`\tFrom relative path to localPath: ${localPath}`);
return removeQueryString(localPath);
}

@@ -137,0 +135,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