sl-nic

1.0.1 • Public • Published

Welcome to Sl-NIC

This package simply extract basic information from any given National Identity Card (NIC) issued by the Government of Sri Lanka.

Usage

Installation

npm i sl-nic

Implementation

const nic =  require('sl-nic')

// Will return an Object
const details  =  nic('YOUR NIC NO')

Output

Valid NIC

   { 
      success: true,
      message: 'Success',
      data: { gender: 'Male', dob: 'yyyy/mm/dd', type: 'Old' }
    }

Invalid NIC

{ success: false, message: 'Invalid NIC' }

Attributes

success: boolean

Valid NIC true Invalid NIC false

message: string The status of the request

data: object Following are the

Description Return (string)
gender Gender of the person Male , Female
dob Date of Birth yyyy/mm/dd
type Type of NIC Old , New

Version Info

Version : 1.0.1 Released Date : 31st Aug 2021

Reference

  • This code is build according to the details provided at Wikipedia , accessed date 31st Aug 2021

Contact Developer

Contact via LinkedIn

Readme

Keywords

Package Sidebar

Install

npm i sl-nic

Weekly Downloads

42

Version

1.0.1

License

ISC

Unpacked Size

4.08 kB

Total Files

7

Last publish

Collaborators

  • ktkudagala