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

@brightleaf/react-hooks

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brightleaf/react-hooks - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

17

lib/use-request.js

@@ -61,9 +61,19 @@ "use strict";

const resp = await fetch(urlToFetch, config);
const result = await resp.json();
if (result && result.data) {
if (config.headers['Content-Type'] === 'application/json') {
const result = await resp.json();
if (result && result.data) {
return dispatch({
type: 'success',
payload: {
data: result.data
}
});
}
return dispatch({
type: 'success',
payload: {
data: result.data
data: result
}

@@ -73,2 +83,3 @@ });

const result = await resp.text();
return dispatch({

@@ -75,0 +86,0 @@ type: 'success',

2

package.json
{
"name": "@brightleaf/react-hooks",
"version": "1.3.0",
"version": "1.4.0",
"description": "Useful react hooks",

@@ -5,0 +5,0 @@ "files": [

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