Beta documentation. This is an early preview — content is still in active development. Feedback helps shape the final release. Share your thoughts or join the discussion.

Standard Library Overview

You don't need external libraries. Wapka ships with 7 built-in utility libraries covering HTTP, hashing, encoding, URL manipulation, strings, and logging.

On this page

108 functions, zero packages

You don't need external libraries. Wapka ships with 7 built-in utility libraries covering HTTP, hashing, encoding, URL manipulation, strings, and logging.

Naming convention: All functions use dot-style: url.encode() not url:encode(). No colon.

All libraries at a glance

Library Functions What it does
http 7 Call external APIs — GET, POST, PUT, PATCH, DELETE, HEAD, REQUEST
url 8 Encode, decode, parse, and build URLs
encoder 5 Convert data: JSON, base64, base36, hex, rot13
decoder 5 Parse data: JSON, base64, base36, hex, rot13
hash 9 Hashing, HMAC, random bytes, UUID generation
str 10 String manipulation — split, trim, replace, case
log 5 Structured logging — info, error, warn, debug

Quick reference

-- HTTP
http.get(url, opts)
http.post(url, opts)

-- URL
url.encode("hello world")     → "hello+world"
url.slug("Hello World")       → "hello-world"

-- Encoder
encoder.json({ a = 1 })       → '{"a":1}'
encoder.base64("hello")       → "aGVsbG8="

-- Decoder
decoder.json('{"a":1}')       → { a = 1 }
decoder.base64("aGVsbG8=")   → "hello"

-- Hash
hash.md5("hello")             → "5d41402abc..."
hash.uuid()                   → "7d39eb22-1b4a..."
hash.random(16)               → 32 hex chars

-- String
str.split("a,b,c", ",")       → { "a", "b", "c" }
str.trim("  hello  ")          → "hello"

-- Log
log.info("User logged in")
log.error("Payment failed")

Next: HTTP Client — call external APIs from your scripts.

Next HTTP Client