npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ph-dev-utils/business

v0.1.0

Published

Philippine SEC company/partnership registration-number validator and parser — recognizes the CS/CN/A/FS/FN/PG prefix + year + sequence formats and labels the entity type. Pairs with @ph-dev-utils/psic for industry.

Readme

@ph-dev-utils/business

npm version License: MIT

Validate and parse Philippine SEC registration numbers in JavaScript/TypeScript — recognizes the CS / CN / A / FS / FN / PG prefix + year + sequence formats and labels the entity type. Zero-dependency and browser-safe. Part of the @ph-dev-utils family.

Format-level only. This checks the structure of a registration number and infers the entity type from the prefix. It is not a registry lookup — always confirm a company against the SEC verification portal.

npm install @ph-dev-utils/business

Quick start

import { validateSEC, parseSEC, entityTypeOf, formatSEC } from '@ph-dev-utils/business';

validateSEC('CS2019-12345');   // true
validateSEC('cs201912345');    // true  (dashes/spaces/case ignored)
validateSEC('12345678');       // false (purely numeric legacy certs are out of scope)

parseSEC('CS2019-12345');
// {
//   prefix: 'CS', entityType: 'corporation',
//   entityLabel: 'Stock or non-stock corporation (unified)', era: '2013–present',
//   year: 2019, sequence: '12345', formatted: 'CS2019-12345', raw: 'CS2019-12345'
// }

entityTypeOf('PG2018-00042');  // 'partnership'
formatSEC('cs 2019 12345');    // 'CS2019-12345'  (canonical form)

API

| Function | Returns | | --- | --- | | validateSEC(input) | boolean — matches a recognized SEC reg-number structure | | parseSEC(input) | ParsedSec \| null — prefix, entity type, year, sequence, canonical form | | entityTypeOf(input) | EntityType \| null | | formatSEC(input) | string \| null — canonical PREFIX + YEAR-SEQUENCE | | SEC_PREFIXES | the documented prefix table (prefix, entityType, label, era) |

Recognized prefixes

| Prefix | Entity type | Era | | --- | --- | --- | | CS | Stock or non-stock corporation (unified) | 2013–present | | CN | Non-stock corporation (legacy) | 1986–2012 | | A | Stock corporation (legacy) | pre-2000 | | FS | Foreign stock corporation / branch | 2000–present | | FN | Foreign non-stock corporation | 2000–present | | PG | Partnership | 2017–present |

The recognized structure is prefix + 4-digit year (19xx/20xx) + 3–8 digit sequence, e.g. CS2019-12345. Entity-type labels are a best-effort reading of public SEC guidance — prefixes and their meanings have shifted across eras, so treat them as indicative.

Industry classification

To tag a company's industry, pair this with @ph-dev-utils/psic (Philippine Standard Industrial Classification — sections + divisions).

License

MIT. SEC registration-number formats are factual public information; not affiliated with the Philippine SEC.