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

2.1.0 • Public • Published
Rut.ts logo

Rut.ts: Handle chilean RUT values with ease using TypeScript.

Features

  • Validation: Check if a RUT is valid, with optional strict mode to detect suspicious patterns.
  • Cleaning: Remove extraneous characters and leading zeros from RUT strings.
  • Formatting: Convert RUTs into a standardized format, with or without dots.
  • Decomposition: Split a RUT into its body and verifier digit.
  • Generation: Generate valid random RUT numbers.
  • Calculate Verifier: Calculate the verifier digit for a given RUT body.

Installation

Using npm:

$ npm install rut.ts

Using pnpm:

$ pnpm install rut.ts

Usage

Please refer to the documentation for examples on how to use this library.

Contributing

Contributions to this library are welcome. Please feel free to submit pull requests or create issues for bugs and feature requests.

Package Sidebar

Install

npm i rut.ts

Weekly Downloads

136

Version

2.1.0

License

MIT

Unpacked Size

23.6 kB

Total Files

9

Last publish

Collaborators

  • hansfpc