@ph-dev-utils/psic
v0.1.0
Published
Philippine Standard Industrial Classification (PSIC 2009) — 21 sections (A–U) and 88 divisions with lookup, validation, and search helpers. Data from the PSA/NSCB.
Maintainers
Readme
@ph-dev-utils/psic
The Philippine Standard Industrial Classification (PSIC 2009) for JavaScript/TypeScript — the 21 sections (1-letter codes A–U) and 88 divisions (2-digit codes) with lookup, validation, and keyword-search helpers. Part of the @ph-dev-utils family.
Bundled dataset is browser-safe (compiled in, no network, no fs). Pairs naturally with @ph-dev-utils/business for tagging a registered company's industry.
npm install @ph-dev-utils/psicQuick start
import { findSection, findDivision, sectionOf, listDivisions, search } from '@ph-dev-utils/psic';
findSection('C'); // { code: 'C', title: 'Manufacturing', divisions: ['10', …, '33'] }
findDivision('62'); // { code: '62', title: 'Computer programming, …', section: 'J' }
sectionOf('62'); // { code: 'J', title: 'Information and communication', … }
listDivisions({ section: 'C' }); // the 24 manufacturing divisions (10–33)
search('insurance'); // { sections: [K], divisions: [64?, 65, 66] }API
| Function | Returns |
| --- | --- |
| listSections() | Section[] — all 21 sections (A–U) |
| listDivisions(filter?) | Division[] — all 88; filter by section (case-insensitive) |
| findSection(code) | Section \| null — by 1-letter code (case-insensitive) |
| findDivision(code) | Division \| null — by 2-digit code |
| sectionOf(divisionCode) | Section \| null — the parent section of a division |
| isSectionCode(code) | boolean — is it one of the 21 section letters |
| isDivisionCode(code) | boolean — is it one of the 88 division codes |
| search(query) | { sections, divisions } — keyword match on titles, or exact code |
| META | provenance + version note for the bundled data |
Types
interface Section {
code: string; // 'A'–'U'
title: string;
divisions: string[]; // 2-digit codes under this section
}
interface Division {
code: string; // 2-digit
title: string;
section: string; // parent section letter
}Scope & data
This release covers the two stable top levels of PSIC 2009 — sections and divisions — which is what most industry-categorisation use cases need. The finer group / class / sub-class levels (3–5 digit codes) are out of scope for now.
Data is transcribed from the PSA/NSCB 2009 PSIC codes document (PSIC 2009 is patterned after the UN ISIC Rev.4 at the division level). PSIC 2019 is a newer revision of the standard — confirm against the PSA when the latest codes matter. Not affiliated with the PSA/NSCB. See NOTICE for attribution.
License
MIT. Classification data is factual public information from the PSA/NSCB.
