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

gatsby-plugin-client-side-redirect

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-client-side-redirect - npm Package Compare versions

Comparing version 0.0.2 to 1.0.0

8

clientSideRedirect.js

@@ -7,9 +7,15 @@ module.exports = function getMetaRedirect(toPath) {

const hasLeadingSlash = url.startsWith('/');
const hasTrailingSlash = url.endsWith('/');
if (!hasLeadingSlash) {
url = `/${url}`;
}
if(hasTrailingSlash) {
url = url.slice(0, -1);
}
const resemblesFile = url.includes('.');
if (!resemblesFile) {
url = `${url}/`.replace(/\/\/+/g, '/');
url = `${url}`.replace(/\/\/+/g, '/');
}

@@ -16,0 +22,0 @@ }

2

package.json
{
"name": "gatsby-plugin-client-side-redirect",
"version": "0.0.2",
"version": "1.0.0",
"repository": "git@github.com:dhakerShiv/gatsby-plugin-client-side-redirect.git",

@@ -5,0 +5,0 @@ "author": "Shivnarayan Dhaker <shivnarayandhakar@gmail.com>",

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