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

use-form-input

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-form-input - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

4

dist/index.d.ts

@@ -1,2 +0,2 @@

import * as React from "react";
import * as React from 'react';
declare type ErrorType<T> = {

@@ -18,3 +18,3 @@ [key in keyof T]: {

{
onChange: (name: keyof T, value?: ValueType | ((previousValue: ValueType) => any)) => (event?: any) => void;
onChange: (name: keyof T, value?: ValueType | ((previousValue: ValueType) => any)) => (event?: React.ChangeEvent<any>) => void;
validator: ValidatorType<T>;

@@ -21,0 +21,0 @@ isValid: (errors: ErrorType<T> | {}) => boolean;

@@ -30,2 +30,3 @@ Object.defineProperty(exports, '__esModule', { value: true });

return function (event) {
event === null || event === void 0 ? void 0 : event.persist();
setData((prev) => {

@@ -37,3 +38,3 @@ var _a;

else {
if (typeof value === "function") {
if (typeof value === 'function') {
const functionReturnValue = value(prev[name]);

@@ -40,0 +41,0 @@ return Object.assign(Object.assign({}, prev), { [name]: functionReturnValue });

{
"name": "use-form-input",
"version": "1.1.0",
"version": "1.1.1",
"description": "Simple hook to provide form validation in react",

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

Sorry, the diff of this file is not supported yet

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