Package Exports
- faker-hk
- faker-hk/dist/index.js
- faker-hk/esm/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (faker-hk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Faker HK
Faker HK is a tool to generate fake Hongkongers' profile in ethnic Chinese. The package draws over 2 million naming combinations with proper Cantonese Romanisation. The package is based on Cantonese Romanisation and hkid.
Demo is available here.
Install
npm install faker-hkor
yarn add faker-hkUsage
new Person(seed?: number)
import Person from "faker-hk";
// @return: a random person profile
console.log(new Person())
// @return a profile with seed specified
console.log(JSON.stringify(new Person(19911202)))
/*
{
"sex": "m",
"chnFirstname": "潤成",
"hkid": "XA2021193",
"chnSurname": "黃",
"firstname": "Yun Shing",
"surname": "Wong",
"avatar": "https://avatars.githubusercontent.com/u/19911202",
"birth": "1942-01-06T16:20:07.197Z",
"phone": "69911201",
"address": "45 TUEN LUNG STREET, TUEN MUN DISTRICT",
"chnAddress": "屯門區屯隆街45號"
}
*/Dictionary
If you would like to update the dictionary, you may checkout ./dictionary/*.json in the repository.
Contribute
Project owner chunlaw is the initiator of the whole project. Everyone is welcome to contribute.
License
MIT license