use-rut

1.1.1 • Public • Published

useRut hook

A React Custom Hook that allows to format and verify Rut (Chilean DNI).

Edit use-rut

Installation

npm install use-rut

How to use

...
import useRut from 'use-rut';

function App() {
  const [rut, valido, setRut] = useRut();
  return (
    <div className="App">
      <input onChange={(e) => setRut(e.target.value)} value={rut}/>
      <h2>{`valido: ${valido}`}</h2>
    </div>
  );
}

🤖 Author

Carlos Fernández

You can follow me on github


Copyright © 2021 UseRut Hook.

Package Sidebar

Install

npm i use-rut

Weekly Downloads

1

Version

1.1.1

License

MIT

Unpacked Size

4.29 kB

Total Files

4

Last publish

Collaborators

  • carlosfdezb