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

@vuepress/shared

Package Overview
Dependencies
Maintainers
6
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vuepress/shared - npm Package Compare versions

Comparing version 2.0.0-beta.61 to 2.0.0-beta.62

13

./dist/index.js

@@ -37,6 +37,6 @@ // src/utils/index.ts

// src/utils/ensureLeadingSlash.ts
var ensureLeadingSlash = (str) => str.replace(/^\/?/, "/");
var ensureLeadingSlash = (str) => str[0] === "/" ? str : `/${str}`;
// src/utils/ensureEndingSlash.ts
var ensureEndingSlash = (str) => /(\.html|\/)$/.test(str) ? str : str + "/";
var ensureEndingSlash = (str) => str[str.length - 1] === "/" || str.endsWith(".html") ? str : `${str}/`;

@@ -90,6 +90,6 @@ // src/utils/formatDateString.ts

// src/utils/removeEndingSlash.ts
var removeEndingSlash = (str) => str.replace(/\/$/, "");
var removeEndingSlash = (str) => str[str.length - 1] === "/" ? str.slice(0, -1) : str;
// src/utils/removeLeadingSlash.ts
var removeLeadingSlash = (str) => str.replace(/^\//, "");
var removeLeadingSlash = (str) => str[0] === "/" ? str.slice(1) : str;

@@ -114,3 +114,6 @@ // src/utils/resolveLocalePath.ts

// src/utils/resolveRoutePathFromUrl.ts
var resolveRoutePathFromUrl = (url, base = "/") => url.replace(/^(https?:)?\/\/[^/]*/, "").replace(new RegExp(`^${base}`), "/");
var resolveRoutePathFromUrl = (url, base = "/") => {
const pathname = url.replace(/^(https?:)?\/\/[^/]*/, "");
return pathname.startsWith(base) ? `/${pathname.slice(base.length)}` : pathname;
};
export {

@@ -117,0 +120,0 @@ dedupeHead,

@@ -37,6 +37,6 @@ // src/utils/index.ts

// src/utils/ensureLeadingSlash.ts
var ensureLeadingSlash = (str) => str.replace(/^\/?/, "/");
var ensureLeadingSlash = (str) => str[0] === "/" ? str : `/${str}`;
// src/utils/ensureEndingSlash.ts
var ensureEndingSlash = (str) => /(\.html|\/)$/.test(str) ? str : str + "/";
var ensureEndingSlash = (str) => str[str.length - 1] === "/" || str.endsWith(".html") ? str : `${str}/`;

@@ -90,6 +90,6 @@ // src/utils/formatDateString.ts

// src/utils/removeEndingSlash.ts
var removeEndingSlash = (str) => str.replace(/\/$/, "");
var removeEndingSlash = (str) => str[str.length - 1] === "/" ? str.slice(0, -1) : str;
// src/utils/removeLeadingSlash.ts
var removeLeadingSlash = (str) => str.replace(/^\//, "");
var removeLeadingSlash = (str) => str[0] === "/" ? str.slice(1) : str;

@@ -114,3 +114,6 @@ // src/utils/resolveLocalePath.ts

// src/utils/resolveRoutePathFromUrl.ts
var resolveRoutePathFromUrl = (url, base = "/") => url.replace(/^(https?:)?\/\/[^/]*/, "").replace(new RegExp(`^${base}`), "/");
var resolveRoutePathFromUrl = (url, base = "/") => {
const pathname = url.replace(/^(https?:)?\/\/[^/]*/, "");
return pathname.startsWith(base) ? `/${pathname.slice(base.length)}` : pathname;
};
export {

@@ -117,0 +120,0 @@ dedupeHead,

{
"name": "@vuepress/shared",
"version": "2.0.0-beta.61",
"version": "2.0.0-beta.62",
"description": "Utils that shared between VuePress node and client",

@@ -33,3 +33,3 @@ "keywords": [

"@mdit-vue/types": "^0.12.0",
"@vue/shared": "^3.2.47"
"@vue/shared": "^3.3.1"
},

@@ -36,0 +36,0 @@ "publishConfig": {

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