https://github.com/ziv/idil
Israeli ID number utilities
https://github.com/ziv/idil
Last synced: 2 months ago
JSON representation
Israeli ID number utilities
- Host: GitHub
- URL: https://github.com/ziv/idil
- Owner: ziv
- License: mit
- Created: 2020-08-05T09:59:15.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-08T09:37:58.000Z (over 5 years ago)
- Last Synced: 2024-10-18T09:05:19.178Z (over 1 year ago)
- Language: TypeScript
- Size: 273 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# idil
Israeli ID number utilities
Installation:
```
npm i idil
yarn add idil
```
Usage:
* Generate check digit for given Israeli ID number
```typescript
import {generate} from 'idil';
const checkDigit = generate('12345678');
```
* Validate ID number
```typescript
import {validate} from 'idil';
// using id with check digit
if (validate('123456782')) {
// id is valid
}
if (validate('12345678', 2)) {
// is is valid
}
```
---
* Contain type definition for TypeScript
* MIT License