react-rut
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

React RUT

The goal of this bundle is provide a chilean RUT utilities for [React].

Install

with NPM:

npm install react-rut

with Yarn:

yarn add react-rut

Usage

import React from 'react';
import { useRut } from 'react-rut';
 
const Component: React.FC = () => {
  // you can set a default value with "useRut('1-9')"
  const [{ formattedValue }, setRut] = useRut();
 
  return (
    <input
      value={formattedValue}
      onChange={(e) => setRut(e.target.value)}
    />
  );
};
 
export default Component;

Testing

npm run test

React

Readme

Keywords

Package Sidebar

Install

npm i react-rut

Weekly Downloads

28

Version

1.0.0

License

none

Unpacked Size

24.9 kB

Total Files

50

Last publish

Collaborators

  • afex