🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

input-builderx

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

input-builderx

## Overview

latest
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

InputX

Overview

Enhanced html input with validation, data input and output processing.

Installation

yarn add input-builderx

or

npm install input-builderx --save

Demo

Try the demo here.

Usage

Import the React component

import { InputX } from 'input-builderx';
<InputX
  value={this.state.val}
  onChange={(e: any) => this.setState({ val: e.target.value })}
  validator={e => e.target.value % 2 == 0}
  inputProcessor={e => Math.round(e.target.value / 10) * 10}
  outputProcessor={e => Math.round(e.target.value / 10) * 10}
/>

API

EventDescription
validatorfunction. Optional. Checks the validity of the user input. If it returns true then the onChange function is called.
inputProcessorfunction. Optional. Processor function for the value prop.
outputProcessorfunction. Optional. Processor function for the user input values that will be passed to onChange after processing.

License

Licensed under the MIT license.

FAQs

Package last updated on 02 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts