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

@creatorsofocode/estonian-code

v1.0.1

Published

Eestikood - Eesti keelel põhinev programmeerimiskeel

Readme

🇪🇪 Eestikood

The first Estonian programming language.
Write code in Estonian — it runs in your browser instantly.

Try it live →  ·  Eesti keeles 🇪🇪


✨ What is Eestikood?

Eestikood ("Estonian Code") is a programming language whose keywords and built-in functions are written in the Estonian language. It transpiles to JavaScript and runs directly in the browser — no installation required beyond node server.js.

Think of it as JavaScript, but fully Estonianised:

// Hello, World!
lase nimi = "Maailm"
kuva("Tere, " + nimi + "!")
// Transpiles to:
let nimi = "Maailm"
console.log("Tere, " + nimi + "!")

🚀 Quick Start

Prerequisites

Run locally

git clone https://github.com/creatorsofcode/Eestikood-Programming-Language.git
cd Eestikood-Programming-Language
npm install
npm start

Open http://localhost:5000 in your browser. That's it.

Use in other Node.js projects

npm install eestikood
const { transpileeri, kaivita } = require('eestikood');

const kood = `
lase nimi = "Maailm"
kuva("Tere, " + nimi + "!")
`;

const js = transpileeri(kood);
console.log(js);

kaivita(kood);

CLI usage:

npx eestikood run naide.ek
npx eestikood transpile naide.ek --out naide.js

🗂️ Project Structure

Eestikood-Programming-Language/
│
├── server.js            ← Express server (port 5000)
├── package.json
│
├── public/
│   ├── index.html       ← Browser playground (IDE-style UI)
│   ├── eestikood.js     ← Transpiler + runtime engine
│   ├── app.js           ← UI logic + all built-in examples
│   └── style.css        ← Dark theme (Estonian flag colours)
│
└── naited/              ← Example .ek source files
    ├── tere_maailm.ek
    ├── klassid_oop.ek
    └── virn_stack.ek

📖 Language Reference

Declarations

| Eestikood | JavaScript | Description | |---|---|---| | lase x = 5 | let x = 5 | Block-scoped variable | | konstant PI = 3.14 | const PI = 3.14 | Constant | | muutuja n = 0 | var n = 0 | Function-scoped variable |

Values / Literals

| Eestikood | JavaScript | |---|---| | tõsi | true | | väär | false | | tühi | null | | määramata | undefined |

Operators

| Eestikood | JavaScript | Meaning | |---|---|---| | a on b | a === b | Strict equality | | a ei ole b | a !== b | Strict inequality | | a ja b | a && b | Logical AND | | a või b | a \|\| b | Logical OR |

Conditionals

kui (skoor > 90) {
    kuva("Suurepärane!")
} muidu kui (skoor > 60) {
    kuva("Hea!")
} muidu {
    kuva("Proovi uuesti.")
}

Loops

// Classic for loop
korda (lase i = 0; i < 5; i++) {
    kuva(i)
}

// for...of
korda (lase element kohta massiiv) {
    kuva(element)
}

// for...in
korda (lase võti sees objekt) {
    kuva(võti)
}

// while loop
kuni (tingimus) {
    tee_midagi()
    kui (lõpp) katkesta
}

Functions

// Named function
funktsioon tervita(nimi = "Võõras") {
    tagasta "Tere, " + nimi + "!"
}

// Arrow function (standard JS syntax — still works)
lase ruut = x => x * x

// Rest parameters
funktsioon summa(...arvud) {
    tagasta arvud.reduce((s, n) => s + n, 0)
}

kuva(tervita("Kati"))          // Tere, Kati!
kuva(ruut(7))                  // 49
kuva(summa(1, 2, 3, 4))        // 10

Classes (OOP)

klass Loom {
    konstruktor(nimi, hääl) {
        see.nimi = nimi
        see.hääl = hääl
    }

    häälitse() {
        kuva(see.nimi + " ütleb:", see.hääl)
    }

    staatiline liik() {
        tagasta "Loom"
    }
}

klass Koer laiendab Loom {
    konstruktor(nimi, tõug) {
        vanem(nimi, "Auh!")
        see.tõug = tõug
    }
}

lase muki = uus Koer("Muki", "Labrador")
muki.häälitse()                             // Muki ütleb: Auh!
kuva(muki onNäidis Koer)                    // tõsi
kuva(muki onNäidis Loom)                    // tõsi

Error Handling

funktsioon jagamine(a, b) {
    kui (b on 0) {
        viska uus Error("Nulliga jagamine!")
    }
    tagasta a / b
}

proovi {
    kuva(jagamine(10, 0))
} püüa (viga) {
    kuva("Viga:", viga.message)
} lõpuks {
    kuva("Valmis.")
}

Async / Await

asünkroonne funktsioon laadi() {
    kuva("Laadin...")
    oota oota_ms(1000)
    kuva("Andmed saadud!")
}

laadi()

Switch

vali (päev) {
    juhtum 1: kuva("Esmaspäev"); katkesta
    juhtum 5: kuva("Reede");     katkesta
    vaikimisi: kuva("Nädalavahetus!")
}

🔧 Built-in Functions

| Function | Description | JavaScript equivalent | |---|---|---| | kuva(...) | Print to output | console.log() | | küsi(tekst) | Ask user for input | prompt() | | juhus() | Random float 0–1 | Math.random() | | ümmarda(n) | Round to nearest integer | Math.round() | | põrand(n) | Round down | Math.floor() | | lagi(n) | Round up | Math.ceil() | | maks(a, b, ...) | Maximum value | Math.max() | | min(a, b, ...) | Minimum value | Math.min() | | ruut(n) | Square root | Math.sqrt() | | abs(n) | Absolute value | Math.abs() | | astme(a, b) | Power a^b | Math.pow() | | onMassiiv(v) | Is value an array? | Array.isArray() | | JSONiks(v) | Serialise to JSON | JSON.stringify() | | JSONist(s) | Parse JSON string | JSON.parse() | | oota_ms(ms) | Async wait in ms | setTimeout promise | | praegu() | Current timestamp | Date.now() |


🌐 Available Global Objects

Since Eestikood runs in the browser, all standard browser globals are available:

// DOM
document
window
navigator
location
localStorage
sessionStorage
fetch

// Standard classes
Massiiv    // Array
Objekt     // Object
Tekst      // String
Arv        // Number
Tõeväärtus // Boolean
Kuupäev    // Date
Map, Set, Promise, Symbol

// Constants
PI         // Math.PI

⌨️ Keyboard Shortcuts (Playground)

| Shortcut | Action | |---|---| | Ctrl + Enter | Run code | | F5 | Run code | | Tab | Insert 4 spaces |


💡 Complete Keyword Table

| Eestikood | JavaScript | |---|---| | lase | let | | konstant | const | | muutuja | var | | funktsioon | function | | tagasta | return | | kui | if | | muidu | else | | muidu kui | else if | | korda | for | | kuni | while | | katkesta | break | | jätka | continue | | kohta | of | | sees | in | | klass | class | | laiendab | extends | | konstruktor | constructor | | see | this | | vanem | super | | uus | new | | staatiline | static | | proovi | try | | püüa | catch | | lõpuks | finally | | viska | throw | | vali | switch | | juhtum | case | | vaikimisi | default | | tüüp | typeof | | onNäidis | instanceof | | kustuta | delete | | asünkroonne | async | | oota | await | | impordi | import | | ekspordid | export | | tõsi | true | | väär | false | | tühi | null | | määramata | undefined | | on | === | | ei ole | !== | | ja | && | | või | \|\| |


🏗️ How It Works

Eestikood is a source-to-source transpiler (transpiler):

Eestikood source (.ek)
        │
        ▼
  EestiKoodTranspiler
  (regex-based keyword replacement,
   strings & comments protected)
        │
        ▼
  Valid JavaScript
        │
        ▼
  new Function(...) + runtime globals
        │
        ▼
     Output
  1. Protect — Strings, template literals, and comments are extracted and replaced with placeholders so their contents are never altered.
  2. Transpile — A sorted keyword list (longer / multi-word first) replaces each Estonian keyword with its JavaScript equivalent using word-boundary–aware regexes.
  3. Restore — Placeholders are replaced back.
  4. Execute — The resulting JS runs inside an async IIFE with runtime globals injected via new Function.

📋 Example Programs

Fibonacci sequence

funktsioon fibonacci(n) {
    kui (n <= 1) tagasta n
    tagasta fibonacci(n - 1) + fibonacci(n - 2)
}

korda (lase i = 0; i <= 10; i++) {
    kuva(`fibonacci(${i}) = ${fibonacci(i)}`)
}

Bubble sort

funktsioon mullsorteerimine(massiiv) {
    lase n = massiiv.length
    korda (lase i = 0; i < n - 1; i++) {
        korda (lase j = 0; j < n - i - 1; j++) {
            kui (massiiv[j] > massiiv[j + 1]) {
                lase ajutine = massiiv[j]
                massiiv[j]     = massiiv[j + 1]
                massiiv[j + 1] = ajutine
            }
        }
    }
    tagasta massiiv
}

lase arvud = [64, 34, 25, 12, 22, 11, 90]
kuva("Enne:", arvud)
kuva("Pärast:", mullsorteerimine(arvud))

🤝 Contributing

Pull requests are welcome! To contribute:

  1. Fork the repository
  2. Create a feature branch: git checkout -b uus-omadus
  3. Commit your changes: git commit -m 'Lisa uus omadus'
  4. Push to the branch: git push origin uus-omadus
  5. Open a Pull Request

📜 License

MIT — free to use, modify, and distribute.