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

@restart/hooks

Package Overview
Dependencies
Maintainers
2
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@restart/hooks - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

18

es/useMergeState.js

@@ -32,9 +32,13 @@ "use strict";

if (update === null) return;
if (typeof update === 'function') setState(function (state) {
var nextState = update(state);
return nextState == null ? state : _extends({}, state, nextState);
});
setState(function (state) {
return _extends({}, state, update);
});
if (typeof update === 'function') {
setState(function (state) {
var nextState = update(state);
return nextState == null ? state : _extends({}, state, nextState);
});
} else {
setState(function (state) {
return _extends({}, state, update);
});
}
};

@@ -41,0 +45,0 @@

{
"name": "@restart/hooks",
"version": "0.3.0",
"version": "0.3.1",
"main": "index.js",

@@ -5,0 +5,0 @@ "types": "index.d.ts",

@@ -32,9 +32,13 @@ "use strict";

if (update === null) return;
if (typeof update === 'function') setState(function (state) {
var nextState = update(state);
return nextState == null ? state : _extends({}, state, nextState);
});
setState(function (state) {
return _extends({}, state, update);
});
if (typeof update === 'function') {
setState(function (state) {
var nextState = update(state);
return nextState == null ? state : _extends({}, state, nextState);
});
} else {
setState(function (state) {
return _extends({}, state, update);
});
}
};

@@ -41,0 +45,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