0.6.1 • Published 10 months ago

nrb-qr-parser v0.6.1

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

About NRB QR PARSER

Converts data scanned from an NRB QR code and converts it to a JSON Object format

Install

npm install nrb-qr-parser

Usage

import { parseNrbQr } from "nrb-qr-parser"

const qrString ='03~i<mwi0M3Y181AJ8<<<<<<<<<<<<<<<~6903158m2503158mwi<<<<<<<<<<<0~Dude<<Lambda<lambda<<<<<<<<<<<<<~Dude~ M3Y181AJ~Lambda~lambda~mALE~15 mAR 1989~23 jUN 2017~'
const data = parseNrbQr(qrString)

if (data) {
    console.log(data.docType)
    console.log(data.identifier)
    console.log(data.given_name)
    console.log(data.family_name)
    console.log(data.gender)
    console.log(data.birthdate)
    console.log(data.registration_date)
}

Generated output example

{
    "docType": "Malawi National ID",
    "given_name": "Dude",
    "family_name": "Lambda",
    "identifier": "M3Y181AJ",
    "birthdate": "1989-03-15",
    "gender": "Male",
    "registration_date": "2017-06-23"
}

Supported NRB QR code types

  1. National ID
  2. Birth certificate
  3. Death certificate
  4. Registration receipt
  5. Registration sticker
1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago

0.3.0

11 months ago

0.3.1

11 months ago

0.6.1

10 months ago

0.6.0

10 months ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.0

2 years ago