Socket
Socket
Sign inDemoInstall

@jsenv/filesystem

Package Overview
Dependencies
Maintainers
2
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsenv/filesystem - npm Package Compare versions

Comparing version 2.7.1 to 2.7.2

7

package.json
{
"name": "@jsenv/filesystem",
"version": "2.7.1",
"version": "2.7.2",
"description": "Collection of functions to interact with filesystem in Node.js",

@@ -19,3 +19,4 @@ "license": "MIT",

"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://registry.npmjs.org"
},

@@ -59,2 +60,2 @@ "type": "module",

}
}
}

@@ -13,3 +13,2 @@ export const getCommonPathname = (pathname, otherPathname) => {

const commonString = pathname.slice(0, firstDifferentCharacterIndex + 1)
// the first different char is at firstDifferentCharacterIndex

@@ -16,0 +15,0 @@ if (pathname.charAt(firstDifferentCharacterIndex) === "/") {

@@ -11,5 +11,10 @@ import { urlToRessource } from "./urlToRessource.js"

const searchSeparatorIndex = ressource.indexOf("?")
return searchSeparatorIndex === -1
? ressource
: ressource.slice(0, searchSeparatorIndex)
if (searchSeparatorIndex > -1) {
return ressource.slice(0, searchSeparatorIndex)
}
const hashIndex = ressource.indexOf("#")
if (hashIndex > -1) {
return ressource.slice(0, hashIndex)
}
return ressource
}

@@ -34,3 +34,2 @@ import { getCommonPathname } from "./internal/getCommonPathname.js"

}
const specificPathname = pathname.slice(commonPathname.length)

@@ -37,0 +36,0 @@ const baseSpecificPathname = basePathname.slice(commonPathname.length)

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