Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/unreal4u/rutverifier-js

A pure javascript implementation of rutverifier
https://github.com/unreal4u/rutverifier-js

Last synced: about 2 months ago
JSON representation

A pure javascript implementation of rutverifier

Awesome Lists containing this project

README

        

[![Build Status](https://travis-ci.org/unreal4u/rutverifier-js.png?branch=master)](https://travis-ci.org/unreal4u/rutverifier-js)

rutverifier-js
======

Credits
--------

This class is made by unreal4u (Camilo Sperberg). [unreal4u.com](http://unreal4u.com/).

About this class
--------

* Can be used to verify chilean RUT (Rol único tributario) or RUN (Rol único nacional). (Difference [spanish])
* Is a pure JavaScript implementation. Will return true or false depending on whether the given RUT is valid or not.
* @TODO Will also format the RUT/RUN into the correct format.

Basic usage
----------

<script type="text/javascript" src="dist/rutverifier.min.js">

if (rutVerification('30.686.957-4')) {
console.log('RUT is valid');
} else {
console.log('RUT is not valid');
}
</script>

* Congratulations! That's all you've had to do.

Developing
----------

In order to develop, you'll better off installing [Node.js](http://nodejs.org) in order to run the automated tests and other stuff as well.

Then execute the following at the root of the project:


npm install

In order to do the JavaScript testing and validation, execute the following at
the project's root dir:


grunt

Recommended is to install grunt as a global dependency:


npm install -g grunt-cli

Pending
---------
* Improvements on formatting RUT
* PHP class that can read out the minified version of this class
* Submit to packagist in order to add it as an dependency of unreal4u/rutverifier

Version History
----------

* 1.0.0 :
* Initial version

Contact the author
-------

* Twitter: [@unreal4u](http://twitter.com/unreal4u)
* Website: [http://unreal4u.com/](http://unreal4u.com/)
* Github: [http://www.github.com/unreal4u](http://www.github.com/unreal4u)