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

@tokens-studio/tokenscript-interpreter

v0.12.1

Published

A TypeScript interpreter for TokenScript, a domain-specific language for design token manipulation and computation

Readme

banner.png

Tokenscript

Tokenscript is a dsl that interprets design tokens.

With Tokenscript you can write custom functions and ship logic directly with your design tokens.

This is an early public release. This project is under active development.

Links

Examples

https://github.com/user-attachments/assets/88ee32d5-e4b2-44a0-b98c-a1083332c883

Talks

About the language

Why a Custom DSL?

Tokenscript is a domain-specific language with a compliance library because it provides a small subset of common language features, enabling fast and secure implementation without the complexity of thousands of custom transform functions with different color types.

The result is a powerful, type-safe environment that extends your design system capabilities.

Key Features

  • Custom Types and Units: Define and support custom types and units without relying on platform support
  • Token Computation: Perform complex calculations and transformations on your design tokens
  • Schemas: Combine custom functions as schemas to ship logic alongside your token data

Target Audience

Tokenscript is designed for tool builders and developers who want to extend the language. While Tokenscript itself is not a tool to transform tokens, complementary tools can interpret and permutate token data using the language.

Quick guide

Installation

npm i --save @tokens-studio/tokenscript-interpreter

Interpretation

Tokenscript enables tool builders to work efficiently with design token data.

The fastest way to get started is by using the interpretTokens function with your token json data:

import { interpretTokens } from "@tokens-studio/tokenscript-interpreter";

const tokens = {
  "primary-color": {
    "$value": "#ff6b35",
    "$type": "color"
  },
};

const result = interpretTokens(tokens);
// => {"primary-color": "#ff6b35"}

Permutation with Schemas

import { interpretTokens } from "@tokens-studio/tokenscript-interpreter";

const tokens = {
  "primary-color": {
    "$value": "#ff6b35",
    "$type": "color"
  },
  "secondary-color": {
    "$value": "{primary-color}",
    "$type": "color"
  }
};

const result = interpretTokens(tokens);
// => {"primary-color": "#ff6b35"
//     "secondary-color": "#ff6b35"}

Your desired token features are not tied to any specification or library — enable features by loading the schemas you need.