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

url-join-ts

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

url-join-ts - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

1

lib/constants.d.ts

@@ -5,2 +5,1 @@ export declare const DELIMITER_PATH = "/";

export declare const DELIMITER_SEARCH_VALUES = "=";
export declare const URL_REGEX: RegExp;

@@ -7,2 +7,1 @@ "use strict";

exports.DELIMITER_SEARCH_VALUES = '=';
exports.URL_REGEX = /^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;

5

lib/urlJoin.js

@@ -12,5 +12,4 @@ "use strict";

toString() {
// check is url
if (!constants_1.URL_REGEX.test(this.baseUrl)) {
throw new TypeError('Url must be a valid url.');
if (!this.baseUrl) {
throw new TypeError('Url must be not empty.');
}

@@ -17,0 +16,0 @@ let resultUrl = [this.baseUrl, ...this.paths]

{
"name": "url-join-ts",
"version": "1.0.2",
"version": "1.0.3",
"description": "Join urls and normalize",

@@ -5,0 +5,0 @@ "author": "kvandake",

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