Standard library

Familiar, conventional APIs — the names you already know (fs.readFileSync, path.join, process.cwd) — but statically typed and compiled to native code. Every member is type- and arity-checked before it lowers.

Available now

console

APIType
console.log(x)any → void
console.error(x)any → void

Math

APIType
Math.abs(n)number → number
Math.max(a, b) · Math.min(a, b)(number, number) → number
Math.sign(n)number → int
Math.clamp(n, lo, hi)(number, number, number) → number
Math.sqrt(n)number → number

String

APIType
s.length · s + tint · concatenation
String.isEmpty(s)string → bool
String.contains(s, sub)(string, string) → bool
String.startsWith(s, prefix)(string, string) → bool

Array

APIType
a[i] · a.lengthelement access · int
Array.isEmpty(a)T[] → bool

Errors

APINotes
Error("message") · throw ethrow an error value
try { … } catch (e) { … } finally { … }e.message holds the message

fs · process

APITypeNotes
fs.readFileSync(path, encoding?)(string, string?) → stringUTF-8 text; "" if unreadable
argsCount() · arg(i)→ int · int → stringprocess arguments

Planned

The surface grows in explicit, conformance-backed slices. These modules use the same conventional names; some depend on upcoming language features (noted below).

fs

APINotes
fs.writeFileSync(path, data)
fs.appendFileSync(path, data)
fs.existsSync(path)→ bool
fs.mkdirSync(path, recursive?)
fs.rmSync(path) · fs.unlinkSync(path)
fs.renameSync(a, b) · fs.copyFileSync(a, b)
fs.statSync(path){ size, isFile, isDirectory }record return
fs.readdirSync(path)string[]needs growable arrays

path

APINotes
path.join(a, b, …) · path.resolve(…)
path.basename(p) · path.dirname(p) · path.extname(p)
path.isAbsolute(p) · path.sep

process

APINotes
process.cwd()→ string
process.exit(code)
process.env(key)→ string | null
process.platform · process.archcompile-time constants
process.argvstring[]needs growable arrays

os

APINotes
os.platform() · os.arch()
os.tmpdir() · os.homedir()
os.cpus() · os.hostname()

Math · String · Array (more)

APINotes
Math.floor/ceil/round/trunc/pow/log/sin/cos · Math.PI
s.toUpperCase/toLowerCase/trim/replace/indexOf/slice
s.split(sep)string[]needs growable arrays
a.map/filter/reduce/forEach(fn)uses closures
a.push/pop/sortneeds growable arrays

time · crypto · http

APINotes
time.now() · time.monotonic()milliseconds
crypto.sha256(data) · crypto.sha1(data)→ hex string
http.get(url){ status, body }record return
async fs / http / timersneeds the async runtime

Lumen is statically typed and has no dynamic JSON value — JSON.parse<T> and generic containers (Map, Set) arrive with generics. This is not a package manager; the library is a fixed, contracted surface.