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

react-fetch-hook

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-fetch-hook - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

4

dist/usePromise.js

@@ -44,2 +44,6 @@ "use strict";

if (input instanceof URL) {
return [].concat(_toConsumableArray(accumulator), _toConsumableArray(flattenInput(input.hash, input.host, input.hostname, input.href, input.origin, input.password, input.pathname, input.port, input.protocol, input.search, input.username)));
}
return [].concat(_toConsumableArray(accumulator), [input]);

@@ -46,0 +50,0 @@ }, []);

2

package.json
{
"name": "react-fetch-hook",
"version": "1.2.3",
"version": "1.2.4",
"description": "React fetch hook",

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

@@ -23,2 +23,23 @@ import { flattenInput } from "../usePromise";

});
it("with URL instance", () => {
const url = new URL("https://google.com");
url.search = new URLSearchParams({ a: "aaa", b: "bbb" }).toString();
const result = flattenInput(url, { x: 1 });
expect(result).toMatchObject([
"",
"google.com",
"google.com",
"https://google.com/?a=aaa&b=bbb",
"https://google.com",
"",
"/",
"",
"https:",
"?a=aaa&b=bbb",
"",
"x",
1
]);
});
});

@@ -19,2 +19,20 @@ // @flow

}
if (input instanceof URL) {
return [
...accumulator,
...flattenInput(
input.hash,
input.host,
input.hostname,
input.href,
input.origin,
input.password,
input.pathname,
input.port,
input.protocol,
input.search,
input.username
)
];
}
return [...accumulator, input];

@@ -21,0 +39,0 @@ }, []);

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