Overview & Quick Start
Persian and Iranian utilities
@nexload-sdk/persian
v1.1.0 ReleasedZero-dependency Persian and Iranian utilities: digits, text, mobile, national code, bank, money, Jalali dates.
Examples follow workspace source. Check pending Changesets against your installed version.
Normalize input and format output with explicit units and time zones.
import { normalizeIranMobile } from "@nexload-sdk/persian/mobile";import { money, formatMoney } from "@nexload-sdk/persian/money";import { formatJalali } from "@nexload-sdk/persian/date";
const mobile = normalizeIranMobile("۰۹۱۲۳۴۵۶۷۸۹");const price = formatMoney(money(12500, "IRR"));const date = formatJalali("2024-03-20T12:00:00+03:30");Installation
Section titled “Installation”pnpm add @nexload-sdk/persiannpm install @nexload-sdk/persianyarn add @nexload-sdk/persianbun add @nexload-sdk/persianFor the optional ./zod subpath, install zod separately.
Compatibility
Section titled “Compatibility”| Runtime | Requirements |
|---|---|
| Node.js | 20 or newer |
| Bun, Edge, browser | Intl timezone data for dates |
| Zod subpath | Zod 4.1 or newer, below 5, installed separately |
The core has no runtime dependencies.
When to use
Section titled “When to use”- Normalize and validate Iranian identifiers and bank details.
- Format money with explicit units and Jalali dates in a chosen timezone.
- Search Persian text and look up provinces.
See guides and the API inventory.