summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/README.md b/README.md
index de3e46f..b8c80f3 100644
--- a/README.md
+++ b/README.md
@@ -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