egyptian-nationalid
v1.0.0
Published
Egyptian national identity checker and data extraction from the Egyptian national identity
Downloads
14
Maintainers
Readme
Egyptian national identity
Egyptian national identity checker and data extraction from the Egyptian national identity
Installing
Install with npm / yarn / pnpm / bun:
npm install egyptian-nationalid
yarn add egyptian-nationalid
pnpm add egyptian-nationalid
bun install egyptian-nationalid
Usage
Using Node.js require()
const { getInformation, isValid } = require('egyptian-nationalid');
TypeScript/ES Module support
import { getInformation, isValid } from 'egyptian-nationalid';
import { getInformation, isValid } from 'https://esm.sh/egyptian-nationalid';
Example
/*
To get information from the Egyptian national id
*/
console.log(getInformation("27510120200771"))//To get the Egyptian national id information in English by default
console.log(getInformation("28309102300111", "arabic"))//To get the Egyptian national id information in Arabic
/*
To check whether this is a valid national id or not
*/
console.log(isValid("28309102300111"))// If it is valid it will return true
console.log(isValid("83091024300111"))// If it is not valid, it will return false
getInformation data
English:
{
type: 'Male',
century: '19',
age: 47,
national_id: '27510120200771',
birthday: {
text: '1975/10/12',
date: 1918-03-28T22:00:00.000Z,
day: '12',
month: '10',
year: '1975'
},
governorate: 'Alexandria'
}
Arabic:
{
type: 'ذكر',
century: '19',
age: 47,
national_id: '27510120200771',
birthday: {
text: '1975/10/12',
date: 1918-03-28T22:00:00.000Z,
day: '12',
month: '10',
year: '1975'
},
governorate: 'الإسكندرية'
}
For more details about how the package works you can click here to see how the package works
If you have a problem or have a suggestion
- Contact With Me Discord:
Shuruhatik#2443
- Github | Youtube | My Website
License
Refer to the LICENSE file.