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

use-http

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-http - npm Package Compare versions

Comparing version 1.0.22 to 1.0.23

3

dist/cjs/utils.d.ts

@@ -74,2 +74,3 @@ import { MutableRefObject, DependencyList } from 'react';

* (path = '?foo=bar', url = 'a.com/') => '?foo=bar'
* (path = 'bar', url = 'a.com/?foo=') => 'bar'
* (path = 'foo', url = 'a.com') => '/foo'

@@ -82,4 +83,6 @@ * (path = 'foo', url = 'a.com/') => 'foo'

* (path = '/foo') => '/foo'
* (path = '&foo=bar', url = 'a.com?b=k') => '&foo=bar'
* (path = '&foo=bar') => '&foo=bar'
*/
export declare const addSlash: (input?: string | undefined, url?: string | undefined) => string;
export {};

7

dist/cjs/utils.js

@@ -277,2 +277,3 @@ "use strict";

* (path = '?foo=bar', url = 'a.com/') => '?foo=bar'
* (path = 'bar', url = 'a.com/?foo=') => 'bar'
* (path = 'foo', url = 'a.com') => '/foo'

@@ -285,2 +286,4 @@ * (path = 'foo', url = 'a.com/') => 'foo'

* (path = '/foo') => '/foo'
* (path = '&foo=bar', url = 'a.com?b=k') => '&foo=bar'
* (path = '&foo=bar') => '&foo=bar'
*/

@@ -291,3 +294,3 @@ exports.addSlash = function (input, url) {

if (!url) {
if (input.startsWith('?') || input.startsWith('/'))
if (input.startsWith('?') || input.startsWith('&') || input.startsWith('/'))
return input;

@@ -298,5 +301,5 @@ return "/" + input;

return input.substr(1);
if (!url.endsWith('/') && !input.startsWith('/') && !input.startsWith('?'))
if (!url.endsWith('/') && !input.startsWith('/') && !input.startsWith('?') && !input.startsWith('&') && !url.includes('?'))
return "/" + input;
return input;
};

@@ -74,2 +74,3 @@ import { MutableRefObject, DependencyList } from 'react';

* (path = '?foo=bar', url = 'a.com/') => '?foo=bar'
* (path = 'bar', url = 'a.com/?foo=') => 'bar'
* (path = 'foo', url = 'a.com') => '/foo'

@@ -82,4 +83,6 @@ * (path = 'foo', url = 'a.com/') => 'foo'

* (path = '/foo') => '/foo'
* (path = '&foo=bar', url = 'a.com?b=k') => '&foo=bar'
* (path = '&foo=bar') => '&foo=bar'
*/
export declare const addSlash: (input?: string | undefined, url?: string | undefined) => string;
export {};

@@ -269,2 +269,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

* (path = '?foo=bar', url = 'a.com/') => '?foo=bar'
* (path = 'bar', url = 'a.com/?foo=') => 'bar'
* (path = 'foo', url = 'a.com') => '/foo'

@@ -277,2 +278,4 @@ * (path = 'foo', url = 'a.com/') => 'foo'

* (path = '/foo') => '/foo'
* (path = '&foo=bar', url = 'a.com?b=k') => '&foo=bar'
* (path = '&foo=bar') => '&foo=bar'
*/

@@ -283,3 +286,3 @@ export var addSlash = function (input, url) {

if (!url) {
if (input.startsWith('?') || input.startsWith('/'))
if (input.startsWith('?') || input.startsWith('&') || input.startsWith('/'))
return input;

@@ -290,5 +293,5 @@ return "/" + input;

return input.substr(1);
if (!url.endsWith('/') && !input.startsWith('/') && !input.startsWith('?'))
if (!url.endsWith('/') && !input.startsWith('/') && !input.startsWith('?') && !input.startsWith('&') && !url.includes('?'))
return "/" + input;
return input;
};
{
"name": "use-http",
"version": "1.0.22",
"version": "1.0.23",
"homepage": "https://use-http.com",

@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js",

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