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/fred

v0.1.1

Published

Functional Reactive data EDitor

Readme

fred, a functional reactive editor

CI Coverage Status size

fred is a functional reactive editor designed for dynamic and structured data manipulation using cells as a runtime. fred leverages functional reactivity to track and manage updates in data structures like arrays, objects, and dictionaries.

Core concepts

Data Schema

Define a schema using LabelledTypeDefinition to specify structure, validation rules, and properties of the data.

Editor Nodes

fred models data as a graph of nodes that can represent objects, arrays, or dictionaries. Each node tracks its state reactively.

Functional Operations

fred provides operations like adding/removing elements, modifying properties, and updating dictionaries in a reactive manner.

Walkthrough

Let's see an example that includes both an object and an array.

import { Sheet, SheetProxy } from "@okcontract/cells";
import { DataEditor, newSchema, objectDefinition } from "@okcontract/fred";

const sheet = new Sheet();
const proxy = new SheetProxy(sheet);

// Initialize reactive data
const testArray = proxy.new([], "test");
const data = proxy.new({ test: testArray }, "data");

// Define schema using helpers
const values = objectDefinition(proxy, {
  test: {
    label: "Test",
    array: () =>
      proxy.new({
        label: "Test Item",
        base: "string",
      }),
  },
});
const schema = newSchema(proxy, values);

const editor = new DataEditor(proxy, data, schema);

// Add an element to the array
const arrNode = await editor.follow(["test"]);
await editor.addElement(arrNode);
await proxy.working.wait();

// Verify the new state
console.log(await proxy.get(arrNode.value)); // [{}, "", ...]

Design & Philosophy

We aim for ease of use, correction and security, so chasing down any bug is our top priority.

A non-goal is high-performance.

About

fred 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.

This work is supported in part by a RFG grant from Optimism.