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

zaban-lang

v1.1.1

Published

Zaban — Urdu programming language (lexer, parser, interpreter, CLI)

Readme

Zaban

Urdu programming language — Roman Urdu keywords, dynamically typed, .zbn files.

Playground: github.com/JAWAD-ASGHAR/zaban-language

Install

npm i zaban-lang

CLI

npx zaban run program.zbn
npx zaban help

Global install (optional):

npm i -g zaban-lang
zaban run program.zbn

Library

import { runSource } from "zaban-lang";

const lines = runSource(`
  shuru
    likho "Salam Dunya"
  khatam
`);

console.log(lines.join("\n"));

Exports

import {
  runSource,
  Interpreter,
  tokenize,
  Parser,
  KEYWORDS,
  ZabanError,
} from "zaban-lang";

Program structure

| Urdu | English | Usage | |---|---|---| | shuru | start | Begin program block | | khatam | end | End program block |

  • When both shuru and khatam are present, only code between them runs.
  • Without markers, the entire file is treated as a program.
  • Semicolons are optional. No type annotations — values are dynamically typed.
  • Variables declared inside { } blocks are scoped to that block.

Statements

| Urdu | English | Usage | |---|---|---| | likho | print | likho "salam" or likho x, y | | ye hai | declare | ye hai a = 10 | | = / += / -= / *= / /= | assign | a = 5, b += 1 | | agar | if | agar (x < 5) { ... } | | nahi to agar | else if | chained after first agar | | nahi to / warna | else | nahi to { ... } or warna { ... } | | jab tak | while | jab tak (b < 5) { ... } | | bas | break | exit loop immediately | | agla | continue | skip to next iteration |


Literals

| Urdu | English | Notes | |---|---|---| | sach | true | Boolean | | jhoot | false | Boolean | | khaali | null | Empty value | | 42, 3.14 | number | Integers and decimals | | "hello" | string | Double-quoted text |


Operators

| Category | Symbols | Notes | |---|---|---| | Arithmetic | + - * / | Standard precedence | | Comparison | < > <= >= | Returns sach or jhoot | | Equality | == != | Loose equality | | Unary | - | e.g. -5 or -(a + b) | | Assignment | = += -= *= /= | Update variables |


Examples

Hello World

shuru
  likho "Salam Dunya"
khatam

Output: Salam Dunya

Variables & loop

shuru
  ye hai i = 0
  jab tak (i < 3) {
    likho i
    i += 1
  }
khatam

Output:

0
1
2

If / else if / else

shuru
  ye hai score = 50

  agar (score >= 90) {
    likho "A"
  } nahi to agar (score >= 80) {
    likho "B"
  } nahi to {
    likho "Fail"
  }
khatam

Output: Fail

Arithmetic

shuru
  ye hai result = 3 + 4 * 5
  likho result
khatam

Output: 23

Booleans & null

shuru
  ye hai active = sach
  ye hai deleted = jhoot
  ye hai user = khaali

  likho active
  likho deleted
  likho user
khatam

Output:

true
false
null

Comparison

shuru
  ye hai a = 10
  ye hai b = 20

  likho a < b
  likho a > b
  likho a == b
  likho a != b
khatam

Output:

true
false
false
true

Compound assignment

shuru
  ye hai score = 10
  score += 5
  score -= 2
  score *= 3
  score /= 2
  likho score
khatam

Output: 19.5

Nested if

shuru
  ye hai age = 20
  ye hai score = 90

  agar (age >= 18) {
    agar (score >= 80) {
      likho "Eligible"
    }
  }
khatam

Output: Eligible

Nested loops

shuru
  ye hai i = 0
  jab tak (i < 3) {
    ye hai j = 0
    jab tak (j < 2) {
      likho j
      j += 1
    }
    i += 1
  }
khatam

Output:

0
1
0
1
0
1

If inside loop

shuru
  ye hai a = 3
  ye hai b = 0

  jab tak (b < 5) {
    agar (b == a) {
      likho "b barabar a hai"
    } nahi to agar (b == 0) {
      likho "b sifar hai"
    } nahi to {
      likho b
    }
    b += 1
  }
khatam

Output:

b sifar hai
1
2
b barabar a hai
4

More sample programs: examples on GitHub


Error messages

Errors include line and column numbers, e.g. Line 3, Col 5: Variable 'x' mojood nahi.

Common messages (Roman Urdu):

  • Variable 'x' mojood nahi — variable not defined
  • Variable 'x' pehle se mojood hai — variable already declared
  • Zero se divide nahi ho sakta — division by zero
  • String band nahi hui — unclosed string

License

MIT