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

use-state-validate

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-state-validate - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

12

dist/index.d.ts

@@ -1,3 +0,13 @@

import { IUseStateValidate } from "types";
interface IStateWithValidation<T> {
value: T;
isDirty: boolean;
isValid: boolean;
errorMessages: string[];
}
export interface IUseStateValidate<T> extends Array<IStateWithValidation<T> | T | ((newValue: T) => void)> {
0: IStateWithValidation<T>;
1: (newValue: T) => void;
2: () => void;
}
export declare const useStateValidate: <T>(initial: T, rules: object) => IUseStateValidate<T>;
export default useStateValidate;

2

package.json
{
"name": "use-state-validate",
"version": "0.0.1",
"version": "0.0.2",
"description": "Custom hook to account for state and validation off single state value",

@@ -5,0 +5,0 @@ "license": "MIT",

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