Socket
Socket
Sign inDemoInstall

@jsenv/urls

Package Overview
Dependencies
Maintainers
0
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsenv/urls - npm Package Compare versions

Comparing version 2.3.1 to 2.3.2

2

package.json
{
"name": "@jsenv/urls",
"version": "2.3.1",
"version": "2.3.2",
"license": "MIT",

@@ -5,0 +5,0 @@ "repository": {

@@ -147,3 +147,11 @@ import { urlToExtension } from "./url_to_extension.js";

: pathname;
const newPathname = `${pathnameWithoutExtension}${extension}`;
let newPathname;
if (pathnameWithoutExtension.endsWith("/")) {
newPathname = pathnameWithoutExtension.slice(0, -1);
newPathname += extension;
newPathname += "/";
} else {
newPathname = pathnameWithoutExtension;
newPathname += extension;
}
return `${origin}${newPathname}${search ? `?${search}` : ""}`;

@@ -150,0 +158,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