1.0.3 ā€¢ Published 2 years ago

sa-id-gen v1.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
2 years ago

sa-id-gen

package version package downloads standard-readme compliant package license make a pull request

Generate fake South African ID

Table of Contents

About

Generates a random fake South African. Can be configured when needed. Based on generate-sa-idnumbers.

Install

Install the package locally within you project folder with your package manager:

With npm:

npm install sa-id-gen

With yarn:

yarn add sa-id-gen

With pnpm:

pnpm add sa-id-gen

Usage

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:

$ sa-id-gen

New ID generated:

šŸ†”   9309165206083

The ID has been copied to your clipboard. šŸ“‹

Can also be configured

$ 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
  3. Submit a pull request

License

MIT