Repository navigation
Releases
pakdatakit 2.6.0
pakdatakit 2.6.0 · Package · Docs · Playground
Minor release: one new feature. Every port gives the same results on the
shared test vectors (812 new ones).
Added
parseAmount()andformatAmountInput()(pakdatakit/format).parseAmount
reads a rupee amount as people type it in Pakistan and returns
{ value, raw }in rupees, rounded half-up to the paisa, ornull. It
accepts150,000and1,50,000grouping with decimals, Urdu and
Arabic-Indic digits,Rs/Rs./PKR/₨and a trailing/-, and the
shorthandk,thousand,hazar,ہزار,lakh,lac,لاکھ,crore,
crandکروڑ(also1.5 lakh,2.25cr). It rejects negatives, ranges,
more than one number, leftover letters, ambiguous grouping and amounts over
Rs. 50 trillion. The arithmetic is done on the digits, so1.005is 1.01
in every language.formatAmountInputwrites the amount back
("Rs. 150,000") for showing next to a field. It never throws.pk.amount()in the Zod, Valibot, Yup, Joi and Superstruct adapters, and
IsPakAmountfor class-validator: passes whenparseAmount()reads the
value.
pakdatakit for Python 2.6.0
pakdatakit for Python 2.6.0 · Package · Docs · Playground
Minor release: one new feature. Every port gives the same results on the
shared test vectors (812 new ones).
Added
parse_amount()andformat_amount_input(), with theParsedAmount
dataclass.parse_amount
reads a rupee amount as people type it in Pakistan and returns
{ value, raw }in rupees, rounded half-up to the paisa, ornull. It
accepts150,000and1,50,000grouping with decimals, Urdu and
Arabic-Indic digits,Rs/Rs./PKR/₨and a trailing/-, and the
shorthandk,thousand,hazar,ہزار,lakh,lac,لاکھ,crore,
crandکروڑ(also1.5 lakh,2.25cr). It rejects negatives, ranges,
more than one number, leftover letters, ambiguous grouping and amounts over
Rs. 50 trillion. The arithmetic is done on the digits, so1.005is 1.01
in every language.format_amount_inputwrites the amount back
("Rs. 150,000") for showing next to a field. It never throws.
PakDataKit for .NET 2.6.0
PakDataKit for .NET 2.6.0 · Package · Docs · Playground
Minor release: one new feature. Every port gives the same results on the
shared test vectors (812 new ones).
Added
Currency.ParseAmount()andCurrency.FormatAmountInput(), with the
ParsedAmountrecord.ParseAmount
reads a rupee amount as people type it in Pakistan and returns
{ value, raw }in rupees, rounded half-up to the paisa, ornull. It
accepts150,000and1,50,000grouping with decimals, Urdu and
Arabic-Indic digits,Rs/Rs./PKR/₨and a trailing/-, and the
shorthandk,thousand,hazar,ہزار,lakh,lac,لاکھ,crore,
crandکروڑ(also1.5 lakh,2.25cr). It rejects negatives, ranges,
more than one number, leftover letters, ambiguous grouping and amounts over
Rs. 50 trillion. The arithmetic is done on the digits, so1.005is 1.01
in every language.FormatAmountInputwrites the amount back
("Rs. 150,000") for showing next to a field. It never throws.[PakAmount]inPakDataKit.DataAnnotationsandIsPakAmount()in
PakDataKit.FluentValidation.
pakdatakit for Dart 2.6.0
pakdatakit for Dart 2.6.0 · Package · Docs · Playground
Minor release: one new feature. Every port gives the same results on the
shared test vectors (812 new ones).
Added
parseAmount()andformatAmountInput()and theParsedAmountclass.parseAmount
reads a rupee amount as people type it in Pakistan and returns
{ value, raw }in rupees, rounded half-up to the paisa, ornull. It
accepts150,000and1,50,000grouping with decimals, Urdu and
Arabic-Indic digits,Rs/Rs./PKR/₨and a trailing/-, and the
shorthandk,thousand,hazar,ہزار,lakh,lac,لاکھ,crore,
crandکروڑ(also1.5 lakh,2.25cr). It rejects negatives, ranges,
more than one number, leftover letters, ambiguous grouping and amounts over
Rs. 50 trillion. The arithmetic is done on the digits, so1.005is 1.01
in every language.formatAmountInputwrites the amount back
("Rs. 150,000") for showing next to a field. It never throws.
pakdatakit 2.5.1
pakdatakit 2.5.1 · Package · Docs · Playground
Patch release: documentation, packaging and dependency updates. No API,
behaviour or data changes; every port still gives the same results on the
shared test vectors.
Changed
- The README is rewritten for what PakDataKit is now: one library in
TypeScript, Python, Dart/Flutter, .NET and PHP/Laravel with React, Vue and
Angular helpers, with a table of every published package, an overview of
the modules by area and a quick start for each language. The old roadmap
is removed. The Dart, .NET and PHP READMEs now say 32,000+ shared test
vectors. - The Python source distribution (sdist) no longer includes
tests/: the
tests needdata/andtest-vectors/from the repository, so they could
not run from the sdist. - Release workflows only start on their own tags (
v1.2.3no longer also
matchesvue-v1.2.3), and a version that is already on its registry is
skipped with a notice instead of failing. - The .NET release keeps the attested
.nupkgfiles and attaches them to
the GitHub release, since nuget.org re-signs packages and its copies
cannot be checked against the build attestation. - Development dependencies updated (tsup 9, jsdom 31, Vitest 5.1, ESLint
10.15, Prettier 3.10, xunit 2.9.3, Microsoft.NET.Test.Sdk 18, and
actions/attest-build-provenance 4).
pakdatakit 2.5.0
pakdatakit 2.5.0 · Package · Docs · Playground
Includes everything prepared for 2.4.0, which was never published on its own: the 2.4.0 changes are listed here with the 2.5.0 ones.
Added
slugify(),compareUrdu(),isRTL()andwrapBidi()(pakdatakit/text).
slugifymakes URL slugs that keep Urdu letters (no transliteration), with
script: 'any' | 'latin' | 'urdu'.compareUrdusorts in Urdu alphabetical
order following the Unicode CLDR collation for Urdu (CLDR 49), with letters
joined to ھ as letters of their own, the same in every port without ICU.
isRTLchecks the first letter's direction;wrapBidiwraps text in
Unicode directional isolates.calculateSalaryTax(),calculateMonthlySalaryTax(),getSalaryTaxSlabs(),
getSalaryTaxYears()andgetTaxYear()(pakdatakit/incometax), with the
new datasetdata/income-tax-slabs.json: the salaried income tax rate table
for tax years 2020 to 2027 from FBR's consolidated Income Tax Ordinance.
Returns the tax, the monthly amount, the effective rate and the slab, rounded
half up to the paisa. Surcharge, credits and exemptions are not applied.
Thesourcefor tax year 2027 is the Finance Act, 2026 as gazetted; FBR
Circular No. 02 of 2026-27 and the consolidated Ordinance are cited in
DATA.md.scoreAddress()andphoneRiskSignals()(pakdatakit/quality): heuristics
for cash on delivery.scoreAddressscores an address 0 to 100 from its city,
house number, street, area, postal code (a known post office scores more)
and landmark words in English, Roman Urdu and Urdu, and lists what is
missing.phoneRiskSignalsflags invalid, landline, service, repeated-digit,
sequential and placeholder numbers. The form adapters gainpk.codPhone()
(IsCodPhonefor class-validator).getSalesTaxRate(),calculateSalesTax()andsplitInclusive()
(pakdatakit/salestax): standard sales tax rates with the dates they
applied, from 1 July 2019, for goods (federal) and for services in Punjab,
Sindh, Khyber Pakhtunkhwa, Balochistan and Islamabad Capital Territory, each
with its law and official source (new datasetsales-tax-rates.json).
Amounts are rounded half up to the paisa.parseElectricityRef(),validateElectricityRef()and
validateGasConsumerNumber()(pakdatakit/bills): DISCO 14-digit reference
numbers (with U/R), DISCO customer IDs, K-Electric account numbers, and SNGPL
and SSGC consumer numbers, in the formats the utilities' bill pages ask for.
discoisnullfor DISCO bills, as no official source maps the digits to a
company.mapCourierStatus()andnormalizeCityForCourier()(pakdatakit/courier):
one status vocabulary for courier statuses, mapping only publicly documented
statuses (PostEx's API guide v4.1.9 and Leopards' "Returned to Shipper"; TCS,
M&P, Trax and BlueEx publish none), and city short forms (LHR,Khi,
Pindi,Isb, Lyallpur, Urdu names) mapped to the city list. No API clients
and no tracking-number detection, as no courier documents its format. The
status mapping is experimental: its values may change in a minor release
as more couriers' lists are added (see CONTRIBUTING.md).buildFbrInvoice()andvalidateFbrInvoice()(pakdatakit/fbr-invoice):
types for FBR's Digital Invoicing JSON, a builder that works out each line's
sales tax, and an offline validator that reports FBR's error codes, following
PRAL's "Technical Specification for DI API" v1.12. No HTTP client and no
tokens.
Changed
- Package metadata: the description, keywords and homepage now follow the same
style in every registry, and CI checks that the version, repository URL,
licence and author agree across ports (npm run check:metadata). binandrepository.urlinpackage.jsonare written in the form npm
publishes, sonpm publishno longer warns that it corrected them.- New
NOTICEfile (included in the npm package) and an "Origin and
attribution" section in the README. test-vectors/README.mddocuments the shared test vectors;
npm run test:portsregenerates them and runs every port against them.dataVersionis now2026-11-18(new dataset: sales tax rates).
pakdatakit-vue 0.1.1
pakdatakit-vue 0.1.1 · Package · Docs · Playground
Published by the release workflow with npm provenance (0.1.0 was published
by hand, without provenance). No API changes.
Changed
- Requires
pakdatakit^2.5.0. 0.1.0 declared^2.4.0, a version that was never published (2.5.0 was the next release); any 2.5 version already satisfied it. - Development dependencies updated (jsdom 31, tsup 9, Vitest 5.1).
pakdatakit-vue 0.1.0
pakdatakit-vue 0.1.0 · Package · Docs · Playground
First release.
useCnic,usePhoneanduseIbancomposables: format as you type, keep
the caret in place when separators are added or removed, and report
empty/incomplete/valid/invalidwith the decoded details. Same
behaviour as thepakdatakit-reacthooks.v-pak-inputdirective for a plain<input>, with or withoutv-model,
and aPakDataKitplugin that registers it globally.PakCheckoutFormandPakKycForm: unstyled, accessible checkout and KYC
forms withv-modeland@submit, validation from pakdatakit, masked
mobile and CNIC inputs, a province → district → (tehsil) cascade with city
suggestions, English and Urdu text (locale,labels), and optional
address and phone hints that loadpakdatakit/qualityand the post office
directory on demand.usePakForm,useCheckoutFormanduseKycFormcomposables, and the
helpers behind the forms (validatePakForm,withField,
citySuggestions,PAK_PROVINCES,formText,PAK_FORM_TEXT).- Requires Vue 3.3 or later and
pakdatakit2.4.0 or later (the hints use
the quality functions added in 2.4.0).
pakdatakit-react 0.2.0
pakdatakit-react 0.2.0 · Package · Docs · Playground
Requires pakdatakit 2.4.0 (for pakdatakit/quality).
Added
PakCheckoutFormandPakKycForm: unstyled checkout and KYC forms with
full name, mobile number, province, district, optional tehsil (tehsil
prop), city with suggestions from the chosen province, address, nearby
place and postal code;PakKycFormadds a required CNIC. The mobile and
CNIC fields reusePhoneInputandCNICInput.- Accessible markup: real
<label for>, native<select>s,requiredand
aria-required,aria-invalidandaria-describedbyon errors, an error
summary withrole="alert"whose links move focus to the field, and focus
on the first invalid field after a blocked submit. locale="ur": Urdu labels, placeholders, errors and hints, with
dir="rtl"andlang="ur"on the form. Any text can be replaced with the
labelsprop.- Controlled (
values/onChange) or uncontrolled (defaultValues) use,
onSubmit(values)with trimmed values,onInvalid(errors),className
and per-elementclassNames. - Optional delivery hints (
hintsprop,usePakHints): address
completeness fromscoreAddress, warning signs fromphoneRiskSignals,
and a postal code that belongs to another city. They never block submit,
are announced witharia-live="polite", and loadpakdatakit/quality
and the post office directory with a dynamicimport()only when turned
on, so the base form bundle stays small. - For react-hook-form and other form libraries:
pakRulesand
createPakRules({ locale, labels })(register('cnic', pakRules.cnic)),
validatePakField,validatePakForm,useLocationOptions,
applyLocationChangeandsuggestCities.
Changed
CNICInput,PhoneInputandIBANInputare marked as pure, so bundlers
drop the ones you do not use.
pakdatakit for Python 2.5.1
pakdatakit for Python 2.5.1 · Package · Docs · Playground
Patch release: documentation, packaging and dependency updates. No API,
behaviour or data changes; every port still gives the same results on the
shared test vectors.
Changed
- The README is rewritten for what PakDataKit is now: one library in
TypeScript, Python, Dart/Flutter, .NET and PHP/Laravel with React, Vue and
Angular helpers, with a table of every published package, an overview of
the modules by area and a quick start for each language. The old roadmap
is removed. The Dart, .NET and PHP READMEs now say 32,000+ shared test
vectors. - The Python source distribution (sdist) no longer includes
tests/: the
tests needdata/andtest-vectors/from the repository, so they could
not run from the sdist. - Release workflows only start on their own tags (
v1.2.3no longer also
matchesvue-v1.2.3), and a version that is already on its registry is
skipped with a notice instead of failing. - The .NET release keeps the attested
.nupkgfiles and attaches them to
the GitHub release, since nuget.org re-signs packages and its copies
cannot be checked against the build attestation. - Development dependencies updated (tsup 9, jsdom 31, Vitest 5.1, ESLint
10.15, Prettier 3.10, xunit 2.9.3, Microsoft.NET.Test.Sdk 18, and
actions/attest-build-provenance 4).