https://github.com/tiaanduplessis/sa-id-gen
Generate fake South African ID
https://github.com/tiaanduplessis/sa-id-gen
generator id identity south-africa
Last synced: 2 months ago
JSON representation
Generate fake South African ID
- Host: GitHub
- URL: https://github.com/tiaanduplessis/sa-id-gen
- Owner: tiaanduplessis
- License: mit
- Created: 2018-03-17T20:36:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-05-25T21:20:16.000Z (over 3 years ago)
- Last Synced: 2025-07-06T12:44:12.402Z (3 months ago)
- Topics: generator, id, identity, south-africa
- Language: JavaScript
- Homepage:
- Size: 150 KB
- Stars: 1
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sa-id-gen
[](https://npmjs.org/package/sa-id-gen)
[](https://npmjs.org/package/sa-id-gen)
[](https://github.com/RichardLitt/standard-readme)
[](https://npmjs.org/package/sa-id-gen)
[](http://makeapullrequest.com)Generate fake South African ID
## Table of Contents
- [sa-id-gen](#sa-id-gen)
- [Table of Contents](#table-of-contents)
- [About](#about)
- [Install](#install)
- [Usage](#usage)
- [Contribute](#contribute)
- [License](#license)## About
Generates a random fake South African. Can be configured when needed. Based on [generate-sa-idnumbers](https://github.com/Chris927/generate-sa-idnumbers).
## Install
Install the package locally within you project folder with your package manager:
With `npm`:
```sh
npm install sa-id-gen
```With `yarn`:
```sh
yarn add sa-id-gen
```With `pnpm`:
```sh
pnpm add sa-id-gen
```## Usage
```js
const generateID = require('sa-id-gen')console.log(generateID({
year: '93', // Last two digits of year
month: '01',
day: '21',
sequence: '908', // 000 - 999
gender: 'male', // 'male' or 'female'
citizenship: 'citizen' // 'citizen' or 'resident'
})) // ''9301215908081'```
Using the CLI:
```sh
$ sa-id-genNew ID generated:
🆔 9309165206083
The ID has been copied to your clipboard. 📋
```Can also be configured
```sh
$ sa-id-gen --gender=female
```## Contribute
1. Fork it and create your feature branch: git checkout -b my-new-feature
2. Commit your changes: git commit -am 'Add some feature'
3.Push to the branch: git push origin my-new-feature
4. Submit a pull request## License
MIT