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

@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.5.0 to 2.5.1

2

package.json
{
"name": "@jsenv/urls",
"version": "2.5.0",
"version": "2.5.1",
"license": "MIT",

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

import { urlToFilename } from "./url_to_filename.js";
export const urlToBasename = (url) => {
export const urlToBasename = (url, removeAllExtensions) => {
const filename = urlToFilename(url);
return filenameToBasename(filename);
const basename = filenameToBasename(filename);
if (!removeAllExtensions) {
return basename;
}
let currentBasename = basename;
// eslint-disable-next-line no-constant-condition
while (true) {
const nextBasename = filenameToBasename(basename);
if (nextBasename === currentBasename) {
return currentBasename;
}
currentBasename = nextBasename;
}
};

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