New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@docusaurus/utils-common

Package Overview
Dependencies
Maintainers
6
Versions
1514
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@docusaurus/utils-common - npm Package Compare versions

Comparing version 2.0.0-beta.41eaa690e to 2.0.0-beta.462b1cf2b

9

lib/applyTrailingSlash.js

@@ -21,2 +21,5 @@ "use strict";

}
function handleTrailingSlash(str, trailing) {
return trailing ? addTrailingSlash(str) : removeTrailingSlash(str);
}
// undefined = legacy retrocompatible behavior

@@ -29,9 +32,5 @@ if (typeof trailingSlash === 'undefined') {

// Never transform '/' to ''
const newPathname = pathname === '/'
? '/'
: trailingSlash
? addTrailingSlash(pathname)
: removeTrailingSlash(pathname);
const newPathname = pathname === '/' ? '/' : handleTrailingSlash(pathname, trailingSlash);
return path.replace(pathname, newPathname);
}
exports.default = applyTrailingSlash;
{
"name": "@docusaurus/utils-common",
"version": "2.0.0-beta.41eaa690e",
"version": "2.0.0-beta.462b1cf2b",
"description": "Common (Node/Browser) utility functions for Docusaurus packages.",

@@ -21,3 +21,3 @@ "main": "./lib/index.js",

"dependencies": {
"@docusaurus/types": "2.0.0-beta.41eaa690e",
"@docusaurus/types": "2.0.0-beta.462b1cf2b",
"tslib": "^2.2.0"

@@ -28,3 +28,3 @@ },

},
"gitHead": "2c55b3a650d826c87c1d4a6c52dcca9309ccdcb6"
"gitHead": "170c20d175e390bcfc788b8802eb7cdebecf2852"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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