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

@okcontract/lambdascript

v0.2.0

Published

A reactive functional scripting language

Readme

lambdascript, a reactive functional scripting language

CI Coverage Status size

lambdascript (λs) is a purely functional programming language that generates reactive expressions using cells as a runtime.

It is similar to formulas in spreadsheets that can be parsed from user inputs or definition templates.

λs is strongly statically typed, i.e. there is a typechecker with inference (akin to OCaml) that verifies expression types before they are built as reactive programs.

Another notable property is the default use of Rationals for both integers and floats of arbitrary length throughout the standard library.

Installation

npm install @okcontract/lambdascript @okcontract/cells

Walkthrough

import { type AnyCell, Sheet } from "@okcontract/cells";
import { Environment, Rational } from "@okcontract/lambdascript";

const proxy = new Sheet().newProxy();
const foo = proxy.new(new Rational(1));
const env = new Environment(proxy, {
  values: {
    foo,
  },
});

// The expression is recomputed whenever `foo` changes.
const expr = (await env.evaluateString("foo + 1")) as AnyCell<Rational>;
expect((await expr.get()).toString()).toBe("2");

foo.set(new Rational(2));
expect((await expr.get()).toString()).toBe("3");

Standard library

The standard library is easily extensible.

If you plan to use a single Environment, a new library is automatically created. However, you can reuse a standard library between environments:

const lib = defaultLibrary(libproxy);
const env1 = new Environment(proxy1, { lib });
// ...
const env2 = new Environment(proxy2, { lib });

Development

Building and testing lambdascript requires a system installation of bun. Bun is deliberately not included in the project's dependencies.

bun install --frozen-lockfile
bun run grammar
bun run test
bun run build
bun run definitions

biome is also deliberately not included as a project dependency. Install it as a system binary if you want to run bun run format or bun run check. The standard bun run build script formats the source before bundling, so it also expects biome to be available on PATH; direct use of bun build does not require Biome.

Design & Philosophy

We aim for ease of use, correction and security, so chasing down any bug is our top priority. Our goal is to run expressions safely from user inputs.

A non-goal is high-performance: lambdascript is slower than eval calls!

About

lambdascript is built at OKcontract and is released under the Apache license.

Contributors are welcome, feel free to submit PRs directly for small changes. You can also reach out on Twitter in advance for larger contributions.