Package Exports
- pinoy-faker
- pinoy-faker/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 (pinoy-faker) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
pinoy-faker
JavaScript faker utilities focused on Philippine test data.
pinoy-faker helps you generate realistic sample values for common Filipino use cases like names, contact details, and government ID formats.
Installation
npm install pinoy-fakerQuick start
const faker = require('pinoy-faker');
console.log(faker.names.fullName());
console.log(faker.contact.mobileNumber());
console.log(faker.government.tin());API
faker.names
Generate Filipino-style names.
firstName(gender?)gendercan bemale,female,m,man,boy, or numeric (> 0= male).- If omitted, gender is randomized.
lastName()fullName(gender?)
faker.names.firstName(); // random
faker.names.firstName('male');
faker.names.lastName();
faker.names.fullName('female');faker.contact
Generate contact details with Philippine-friendly formats.
mobileNumber()→09XXXXXXXXXlandlineNumber(areaCode = '02')→<areaCode>-XXXXXXXemailAddress(name = 'juan.dela.cruz')
faker.contact.mobileNumber(); // e.g. 09171234567
faker.contact.landlineNumber('032'); // e.g. 032-1234567
faker.contact.emailAddress('Juan Dela Cruz'); // juan.dela.cruz@gmail.comfaker.government
Generate formatted mock government numbers for testing (not valid real IDs).
tin()→XXX-XXX-XXX-XXXsss()→XX-XXXXXXX-XphilHealth()→XX-XXXXXXXXX-XpagIbig()→XXXX-XXXX-XXXX
faker.government.tin();
faker.government.sss();
faker.government.philHealth();
faker.government.pagIbig();Notes
- Outputs are randomly generated strings intended for development/testing.
- Generated government numbers follow formatting only and are not guaranteed to pass official validation rules.
Development
Run tests:
npm test