diff options
author | Justin Worthe <justin.worthe@gmail.com> | 2017-02-12 05:54:21 +0200 |
---|---|---|
committer | Justin Worthe <justin.worthe@gmail.com> | 2017-02-12 05:54:21 +0200 |
commit | ac711cfeb0501da332e2355ed341aca776b722d4 (patch) | |
tree | 1b3ad20eef81e61d53f299f44a4ed4fbfc93894d /README.md | |
parent | 2b415c192a11517c73c496a47f69f37b50667484 (diff) |
Renamed main file to better fit browser use
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -19,6 +19,31 @@ and [here](http://knowles.co.za/generating-south-african-id-numbers/). Usage ----- +Download the library from NPM using the following command in a terminal: + +``` +npm install --save south-african-id-parser +``` + +### Usage In NodeJS + +``` +var saIdParser = require('south-african-id-parser'); +var info = saIdParser.parse('9001049818080'); +``` + +### Usage In the Browser + +When used in the browser, the library will add the `saIdParser` object +to the window for you to use. + +``` +<script src="south-african-id-parser.js"></script> +<script> + var info = saIdParser.parse('9001049818080'); +</script> +``` + ### Parse Everything The package exposes the `.parse(idNumber)` method for calling all of |