JSPM

chilean-rutify

2.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 311
  • Score
    100M100P100Q98901F
  • License MIT

javascript npm package for validating and formating chilean run/rut

Package Exports

  • chilean-rutify
  • chilean-rutify/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (chilean-rutify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ChileanRutify

reviewdog rspec

Chilean Rutify is a javascript npm package that makes rut validations and manipulation easy

Installation

install chilean-rutify through npm:

npm install chilean-rutify

Usage

You can use the available utility methods by importing the default object:

import ChileanRutify from 'chilean-rutify';

// using an example rut '36.408.368-8'
let rut = '36408368-8';
ChileanRutify.normalizeRut(rut);
// 364083688
ChileanRutify.formatRut(rut);
// "36.408.368-8"
ChileanRutify.validRut(rut);
// true
ChileanRutify.validRutVerifier(rut)
// true
ChileanRutify.validRutValues(rut)
// true
rut = '36408368';
ChileanRutify.getRutVerifier(rut)
// "8"

or destructure each individual utility method:

import {
  validRutValue,
  validRutValues,
  getRutVerifier,
  validRutVerifier,
  normalizeRut,
  formatRut,
  validRut
} from "chilean-rutify";

// using an example rut '36.408.368-8'
let rut = '36408368-8';
normalizeRut(rut);
// 364083688
formatRut(rut);
// "36.408.368-8"
validRut(rut);
// true
validRutVerifier(rut)
// true
validRutValues(rut)
// true
rut = '36408368';
getRutVerifier(rut)
// "8"

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/mihailpozarski/chilean-rutify-js. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the ChileanRutify project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.