Code Monkey home page Code Monkey logo

arg.js's Introduction

arg.js

npm-version build-status download-count dev-deps

This is a JavaScript library that provides utility functions to do validations of Argentinian's document numbers, identification numbers and phones.

Installation

  1. Install nodejs (https://nodejs.org/en/download/).
  2. Run npm install --save arg.js.

Usage

// CBUs identify a bank account
var cbu = require('arg.js').cbu;
var valid = cbu.isValid('123'); // false

// CUITs identify a person or a company
var cuit = require('arg.js').cuit;
var valid = cuit.isValid('27361705039'); //true

// DNIs identify a person (including a foreigner living in Argentina)
var doc = require('arg.js').document;
var validDni = doc.isValidDni('36111222'); //true

// Phones will be returned with the country and area code
var phones = require('arg.js').phone;
var cleanPhone = phones.clean('1556623011', '11'); //+5491156623011

Build & tests & documentation

PRs are welcome!

  1. To run the tests run npm test.
  2. To build the documentation run gulp doc.
  3. To view the documentation go to docs/gen/index.html.

arg.js's People

Contributors

miparnisari avatar greenkeeper[bot] avatar amouly avatar navarroaxel avatar ivangsosa avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.