Skip to content

Releases: kon2raya24/ph-dev-utils

v0.1.1 — npm install hotfix

19 May 08:51

Choose a tag to compare

Critical fix. v0.1.0 was broken on real npm install — dist/*.js imports referenced ../../../data/*.json (monorepo-relative), but the tarball didn't ship data/. Real installs of @ph-dev-utils/core failed with ERR_MODULE_NOT_FOUND on calls into address / phone modules.

Fix: data/*.json now bundled inside the package; imports rewired to ../data/; data added to the files field.

v0.1.0 has been deprecated on npm. Please upgrade.

PHP package was never affected (PHP-side DataLoader resolves at runtime, and the Packagist mirror bundles data via scripts/split-php.sh).

v0.1.0 — Initial release

19 May 08:37

Choose a tag to compare

Filipino developer utilities for JS and PHP — peso, government IDs, phone parsing, address lookup.

What's in v0.1.0

JS — @ph-dev-utils/core:

  • Peso: formatPHP, parsePHP, pesoToWords
  • Validators: validateTIN/formatTIN, validateSSS/formatSSS, validatePhilHealth/formatPhilHealth, validatePagIBIG/formatPagIBIG
  • Phone: parseMobile (network detect: Globe/Smart/Sun/DITO), parseLandline (area code lookup)
  • Address: listRegions, findRegion, listProvinces, findProvince

PHP — phdevutils/core: same surface area, mirrored API.

Data: 17 regions, ~80 provinces, 23 network prefix mappings.

Install

```bash

JavaScript / TypeScript

npm i @ph-dev-utils/core

PHP

composer require phdevutils/core
```

Requires Node 20+ and PHP 8.1+.

Verification

  • JS: 34 vitest tests pass
  • PHP: 25 PHPUnit tests pass

See the ph-faker sibling package for PH-localized test-fixture generation.