docs: update README to reflect current API surface#75
Conversation
The README was severely outdated: documented 4 countries (97 supported), 3 international validators (7 exist), a minimal Validator type (missing 7 optional properties), and 76 tests (now 4,185). Updated all sections to match the actual codebase.
|
| Filename | Overview |
|---|---|
| README.md | Expanded country table to 96 entries, added international validators (BIC, ISIN, EU VAT), documented full Validator type, listed all 23 parse()-supporting validators, and fixed detectNetwork usage. One logic issue: the reserved-keyword export aliases (do_, in_, is_) are not documented, which will confuse users attempting to import those namespaces. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
PKG["@stll/stdnum"]
PKG --> INTL["International validators\nbic · creditcard · iban · isin · lei · luhn · eu/vat"]
PKG --> COUNTRIES["Country namespaces\n96 countries (ad … za)"]
PKG --> TOPEXPORTS["Top-level named exports\ndetectNetwork()\nCardNetwork type"]
COUNTRIES --> NORMAL["Standard names\n(cz, de, pl, …)\nimport { cz } from '@stll/stdnum'"]
COUNTRIES --> RESERVED["Reserved-keyword aliases\ndo_ · in_ · is_\nimport { do_, in_, is_ } from '@stll/stdnum'"]
INTL --> VALIDATOR["Validator interface\ncompact · format · validate\n+ optional: generate · parse · examples · …"]
NORMAL --> VALIDATOR
RESERVED --> VALIDATOR
VALIDATOR --> PARSE["parse() — 23 validators\nreturns structured data\ne.g. { birthDate, gender }"]
Reviews (2): Last reviewed commit: "fix: correct detectNetwork usage and cou..." | Re-trigger Greptile
- detectNetwork is a top-level named export, not a method on the creditcard validator object - Country count is 96 (eu is in International section, not a country namespace)
|
Both confidence score concerns addressed in 25988cb:
CC on behalf of @jan-kubica |
Summary
Validatortype including optional properties (description,sourceUrl,lengths,examples,generate,aliases,candidatePattern)parse()support (was onlycz.rc)detectNetwork()andCardNetworktype from creditcard moduleTest plan