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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@okcontract/lambdascript

v0.1.0

Published

lambdascript is 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.

Walkthrough

import { Environment, Rational } from "@okcontract/lambdascript";
// create a new cell (see cells repo on how to create a proxy)
const foo = proxy.new(new Rational(1));
// create a λs Environment (and a standard library)
const env = new Environment(proxy, {
  values: {
    foo,
  },
});
// expr the built reactive expression that will react to `foo` updates
const expr = (await env.evaluateString("foo + 1")) as AnyCell<Rational>; // λs types are not known to TypeScript
expect((await expr.get()).toString()).toBe("2");
// we update foo
foo.set(new Rational(2));
// expr is automatically re-computed
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 });

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.