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

0.1.1 • Public • Published

Rut Helpers

Build Status

A small collection of helpers to validate and format strings to RUT (Chilean DNI).

Installation

npm install rut-helpers --save

or with Yarn

yarn add rut-helpers

Use

// You can import everything
import * as rutHelpers from 'rut-helpers';
 
// Or import only what you need.
import { rutValidate, rutFormat } from 'rut-helpers';
 
// Or with node
var rutHelpers = require('rut-helpers');

Validating RUTs

 
rutHelpers.rutValidate('THIS IS A RUT');
// false
 
rutHelpers.rutValidate('7.618.285-K');
// true
 
rutHelpers.rutValidate('7618285K');
// true

Formatting strings as RUTs

rutHelpers.rutFormat('7618285K');
// 7.618.285-K

Cleaning RUTs

rutHelpers.rutClean('7.618.285-K');
// 7618285K

Contributing

If you want to add functionality please go to the contributing

Credits

Thank you contributors!

Platanus

rut-helpers is maintained by platanus.

License

Potassium is © 2017 platanus, spa. It is free software and may be redistributed under the terms specified in the LICENSE file.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.12,723latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.12,723
0.1.089

Package Sidebar

Install

npm i rut-helpers

Weekly Downloads

2,812

Version

0.1.1

License

MIT

Last publish

Collaborators

  • fprebolledo
  • difernandez
  • rjherrera
  • blackjid
  • iobaixas
  • leantraxxx