1.1.7 • Published 3 years ago

arg.js v1.1.7

Weekly downloads
228
License
ISC
Repository
github
Last release
3 years ago

arg.js

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

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.
1.1.7

3 years ago

1.1.6

4 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago