ö.js

30/10 2024
gjort ◼︎ abc js ö y

Ouml a.k.a. ö.js is a (semi-)small collection of useful stuff. It has been collected and refined while building quick prototypes and experiments, and aims to solve common use cases in js in an efficient and intuitive way. Find it on github, npm, or with full documentation here.

Ö.js contains methods for for example array manipulation, type checking, easy async, math, lerping, tree structures, some functional utilities, and some common web stuff. It’s a bit like lodash, but without the bloat.

The package also contains öbservable, a minimal reactivity module; övents, a collection of events not yet present in browsers; chain a.k.a TypelessScript, letting you chain any method calls on any type; and colour, providing simple functions for working with immutable oklch colours.

Ö.js is definitely not the most popular package on npm, but it solves my use case and lets my brain brain. Maybe it lets your brain brain too?

A quick example, whats the value of v?

const f = v => v

Here’s one solution:

const f = v => {
    console.log(v)
    return v
}

Here’s the ö.js solution:

const f = v => ö.log(v)

Why doesn’t console.log have a return value? Well, here it does.