New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

use-input-mask

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-input-mask

![MIT License][license-badge] [![downloads][downloads-badge]][npmcharts] [![PRs Welcome][prs-badge]][prs]

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
74
-8.64%
Maintainers
1
Weekly downloads
 
Created
Source

use-input-mask

MIT License downloads PRs Welcome

Installation

$ yarn add use-input-mask
# or
$ npm i use-input-mask

Usage

import React from 'react'

import useInputMask from 'use-input-mask'

import { createAutoCorrectedDatePipe } from "text-mask-addons";

const MyDateInput = props => {
  const input = useRef(null);

  const autoCorrectedDatePipe = createAutoCorrectedDatePipe("dd/mm/yyyy HH:MM");

  const onChange = useInputMask({
    input,
    onChange: props.onChange,
    mask: [/\d/, /\d/, "/", /\d/, /\d/, "/", /\d/, /\d/, /\d/, /\d/],
    pipe: autoCorrectedDatePipe,
    keepCharPositions: true
  });

  return <input {...props} ref={input} onChange={onChange} />;
};

export default MyDateInput

Roadmap

  • tests
  • ci/cd
  • semantic-release
  • docs
  • all-contributors

Inspiration

text-mask

LIENSE

MIT

FAQs

Package last updated on 19 Jul 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