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

@jsenv/urls

Package Overview
Dependencies
Maintainers
2
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 1.2.1 to 1.2.2

2

package.json
{
"name": "@jsenv/urls",
"version": "1.2.1",
"version": "1.2.2",
"license": "MIT",

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

@@ -10,5 +10,6 @@ export const getCommonPathname = (pathname, otherPathname) => {

const otherLength = otherPathname.length
while (i < pathname.length) {
while (i < length) {
const char = pathname.charAt(i)
const otherChar = otherPathname.charAt(i)
i++
if (char === otherChar) {

@@ -23,5 +24,8 @@ if (char === "/") {

} else {
if (char === "/" && i - 1 === otherLength) {
commonPart += "/"
commonPathname += commonPart
}
return commonPathname
}
i++
}

@@ -28,0 +32,0 @@ if (length === otherLength) {

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