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

griot-math

v0.1.2

Published

Living memory mathematics — stories as data structures, inspired by West African griot tradition

Readme

griot-math

Living memory mathematics for JavaScript — West African griot oral tradition as decay, genealogy, and federated memory.

What This Does

griot-math models oral memory systems inspired by West African griots. Stories have importance weights that decay exponentially over time but are boosted by retelling. It tracks story genealogy, generates praise names (lossy compression), performs call-and-response similarity matching, and supports federated memory networks. Use it for caching with cultural decay, knowledge graphs, or distributed memory.

The Cultural Root

See the Python version (griot-math on PyPI) for the full cultural background. Griots maintain oral histories where frequently told stories survive — memory as exponential decay with reinforcement.

Install

npm install griot-math

Quick Start

import { Griot, generatePraiseName, callAndResponse, Federation } from "griot-math";

const griot = new Griot();
const s1 = griot.addStory({ name: "The founding", weight: 1.0, tags: ["history"] });
const s2 = griot.addStory({ name: "The flood", weight: 0.8, parentId: s1, tags: ["disaster"] });

griot.tellStory(s1);  // Boost weight
griot.tellStory(s1);
griot.applyDecay(3600);  // 1 hour decay

const strengths = griot.memoryStrengths();
const score = griot.traditionScore();

// Praise names
const praise = generatePraiseName(griot, [s1, s2], "Keeper of Origins");

// Federation
const g2 = new Griot();
g2.addStory({ name: "Another tale", weight: 0.5 });
const fed = new Federation([griot, g2]);
fed.syncStory(0, 1, s2);

API Reference

Griot

  • addStory({ name, weight, parentId?, tags? }) → string
  • findStory(name) → Story | undefined
  • tellStory(name) → number
  • applyDecay(elapsedMs) → void
  • memoryStrengths() → number[]
  • traditionScore() → number

generatePraiseName(griot, storyIds, name) → PraiseName

callAndResponse(caller, responder, callerStoryName) → CallResponse

genealogy(griot, storyName) → Story[]

descendants(griot, storyName) → Story[]

Federation(griots) — syncStory(), mergeMemories(), coverage()

License

MIT