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

jamboscript

v1.0.0

Published

A Swahili-based programming language that transpiles to JavaScript

Downloads

100

Readme

JamboScript 🇰🇪

Lugha ya programu kwa Kiswahili — A Swahili programming language that transpiles to JavaScript.

JamboScript is a beginner-friendly programming language designed for native Swahili speakers to learn programming concepts using familiar language constructs. It lowers the cognitive barrier to learning code by expressing core programming ideas in Swahili while compiling to readable JavaScript.

Installation

# Clone the repository
git clone https://github.com/yourusername/jamboscript.git
cd jamboscript

# Install dependencies
npm install

# Build the transpiler
npm run build

Usage

# Transpile a JamboScript file to JavaScript (outputs to stdout)
npx jamboscript hello.jambo

# Run the transpiled code directly
npx jamboscript hello.jambo | node

# Show help
npx jamboscript --help

Language Features

Keywords / Maneno Muhimu

| JamboScript | JavaScript | Maelezo (Description) | |-------------|------------|----------------------| | acha | let | Variable declaration | | thabiti | const | Constant declaration | | kazi | function | Function declaration | | rudisha | return | Return statement | | kama | if | If statement | | la sivyo | else | Else statement | | wakati | while | While loop | | rudia | for | For loop | | chagua | switch | Switch statement | | hali | case | Case clause | | kawaida | default | Default clause | | vunja | break | Break statement | | endelea | continue | Continue statement | | kweli | true | Boolean true | | sivyo | false | Boolean false | | tupu | null | Null value | | andika() | console.log() | Print output |

Operators / Opereta

All JavaScript operators are supported, plus Swahili alternatives for logical operators:

  • Arithmetic: +, -, *, /, %
  • Comparison: ==, !=, ===, !==, <, >, <=, >=
  • Logical: &&, ||, !
  • Assignment: =, +=, -=, *=, /=
  • Increment/Decrement: ++, --
  • Ternary: ? :

Swahili Operators (Kid-Friendly!)

| JamboScript | JavaScript | Maelezo | |-------------|------------|---------| | ni | == | Equals (ni sawa) | | na | && | And (logical and) | | au | || | Or (logical or) | | si | ! | Not (negation) | | chini | < | Less than (chini ya) | | zaidi | > | Greater than (zaidi ya) | | mpaka | <= | Up to / until | | angalau | >= | At least |

# Badala ya: kama (umri >= 18 && ana_kitambulisho)
# Andika: 
kama (umri angalau 18 na ana_kitambulisho) {
  andika("Unaweza kupiga kura!")
}

# Badala ya: kama (alama < 50 || !amefanya_mtihani)
# Andika:
kama (alama chini 50 au si amefanya_mtihani) {
  andika("Hujapita!")
}

# Range check - very readable!
kama (umri angalau 6 na umri mpaka 18) {
  andika("Anaweza kwenda shule!")
}

Comments / Maoni

# Hii ni maoni (This is a comment)

Examples / Mifano

Hello World

andika("Jambo Dunia!")

Output:

Jambo Dunia!

Variables and Functions

# Tangaza vigezo (Declare variables)
acha jina = "Fatma"
thabiti UMRI = 25

# Kazi ya salamu (Greeting function)
kazi salamu(mtu) {
  kama (mtu == "Fatma") {
    andika("Jambo boss! 👑")
  } la sivyo {
    andika("Jambo " + mtu)
  }
}

salamu(jina)

Loops / Mizunguko

# While loop
acha i = 1
wakati (i <= 5) {
  andika(i)
  i++
}

# For loop
rudia (acha j = 0; j < 3; j++) {
  andika("Hesabu: " + j)
}

Switch Statement

acha siku = 3

chagua (siku) {
  hali 1:
    andika("Jumatatu")
    vunja
  hali 2:
    andika("Jumanne")
    vunja
  hali 3:
    andika("Jumatano")
    vunja
  kawaida:
    andika("Siku nyingine")
}

Ternary Operator

acha umri = 20
acha hadhi = umri >= 18 ? "mtu mzima" : "mtoto"
andika(hadhi)  # Output: mtu mzima

Functions with Return

kazi ongeza(a, b) {
  rudisha a + b
}

acha jumla = ongeza(5, 3)
andika(jumla)  # Output: 8

Project Structure

jamboscript/
├── src/
│   ├── ast.ts        # AST node type definitions
│   ├── lexer.ts      # Tokenizer (converts source to tokens)
│   ├── parser.ts     # Parser (converts tokens to AST)
│   ├── generator.ts  # Code generator (converts AST to JavaScript)
│   └── index.ts      # CLI entry point
├── examples/
│   └── hello.jambo   # Example JamboScript program
├── dist/             # Compiled JavaScript (after build)
├── package.json
├── tsconfig.json
└── README.md

How It Works

JamboScript uses a classic three-stage transpiler architecture:

  1. Lexer (Tokenizer) — Converts source code into tokens, recognizing Swahili keywords, identifiers (with Unicode support), strings, numbers, and operators.

  2. Parser — Converts the token stream into an Abstract Syntax Tree (AST) using recursive descent parsing.

  3. Code Generator — Walks the AST and produces readable, well-formatted JavaScript code.

JamboScript Source → Lexer → Tokens → Parser → AST → Generator → JavaScript

Error Messages

Error messages are bilingual (Swahili and English) to help learners understand what went wrong:

Kosa la sintaksia (Syntax error) [mstari 5, nafasi 10]: Tarajia ')' baada ya hali (Expected ')' after condition)

Contributing

Contributions are welcome! This is an educational project, so please keep code:

  • Simple and readable
  • Well-commented
  • Beginner-friendly

License

MIT


Karibu sana! (You're very welcome!) 🎉