https://github.com/mlezcano1985/rut
Format and validate rut (Chile) number between 2 and 10 digits for browser and NodeJS
https://github.com/mlezcano1985/rut
chile format formatter rut
Last synced: 11 months ago
JSON representation
Format and validate rut (Chile) number between 2 and 10 digits for browser and NodeJS
- Host: GitHub
- URL: https://github.com/mlezcano1985/rut
- Owner: mlezcano1985
- License: mit
- Created: 2019-04-12T15:41:55.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T03:34:23.000Z (over 3 years ago)
- Last Synced: 2025-06-28T00:08:37.932Z (12 months ago)
- Topics: chile, format, formatter, rut
- Language: JavaScript
- Homepage:
- Size: 366 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RUT FORMATTER



Format and validate rut (Chile) number between 2 and 10 digits for browser and NodeJS.
# How to install?
```
npm install --save @mlezcano1985/rut-formatter
```
# Example
On example folder, you find out Web and NodeJS examples. Install dependencies using: `npm install`.
## Web
After install dependencies, run using a web server.
## NodeJS
If you are test on NodeJS, you can run NodeJS example using this task: `npm start`.
# How to use in NodeJS?
```
const rut = require('@mlezcano1985/rut-formatter');
const value = "111111";
console.log(rut.format(value));
```
Terminal should show _11.111-1_. Valid rut.
```
const rut = require('@mlezcano1985/rut-formatter');
const value = "1";
console.log(rut.format(value));
```
Terminal should show _null_. Invalid rut.
# Support
If you are having general issues with this package, feel free to contact me on [Twitter](https://twitter.com/mlezcano1985).
If you believe you have found an issue, please report it using the [GitHub issue tracker](https://github.com/mlezcano1985/rut/issues), or better yet, fork the repository and submit a pull request.
If you're using this package, I'd love to hear your thoughts. Thanks!