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

@docusaurus/utils-common

Package Overview
Dependencies
Maintainers
6
Versions
1449
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.364051f23 to 2.0.0-beta.41b78466d

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.364051f23",
"version": "2.0.0-beta.41b78466d",
"description": "Common (Node/Browser) utility functions for Docusaurus packages.",

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

"dependencies": {
"@docusaurus/types": "2.0.0-beta.364051f23",
"@docusaurus/types": "2.0.0-beta.41b78466d",
"tslib": "^2.2.0"

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

},
"gitHead": "30173993e0ae3bf3e6b4402ebd8e7c7c9979814b"
"gitHead": "7ee53c8fcf0bd3bfb809e440ab9883a7c0debebc"
}

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