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

transformscript

v1.0.6

Published

Light scripting language with Swift style syntax for tranforming data.

Readme

TransformScript (Beta)

TransformScript is a tiny programming language, which allows visitors of websites to easily transform data on client side.

Installation

Use npm (node package manager) to install TransformScript.

npm i transformscript

Usage

TransformScript is interpreted by JavaScript. Here's an basic example which takes a List <Number> as an argument and returns the the list with each element multiplied with itself.

import TransformScript from 'transformscript'

const code = `
    use console as Console
    take list as List <Number>

    for index in 0..<list.length {
        let number = list.item(at: index)
        let result = number * number

        list.set(value: result, at: index)
    }

    console.print(message: list)
    exit list
`

new TransformScript(code).run([1, 2, 3, 4, 5, 6])

The output would be:

[1, 4, 9, 16, 25, 36]

Quick Overview

What's the use-case of TransformScript?

TransformScript is first of all a educational project for myself. Nethertheless it's intentional use case is the transformation of data at runtime. The support of Link-Ins makes it easy for TransformScript to interact with the hosting webpage without the need to provide an API for modification of the doom.

How to interact with JavaScrip (TypeScript)

The interaction between TransformScript and JavaScript is based mainly on Link-Ins. Link-Ins are subclasses of the abstract class LinkedIn. They can use all basic types as properties, function arguments or function return types. Inside these classes any operation can be performed. TransformScript accepts an instance of any subclass of LinkedIn. They are passed using the use keyword (the take keyword is equivalent to use but not good style). Of course a Link-In has to be provided to the script before you can use it inside the script. Call <instance of TransformScript>.provide(<instance of LinkedIn>) before calling <instance of TransformScript>.run()

To pass basic values the use of runtime arguments is recommended. They are passed to the run method of TransformScript. They must be of type boolean, string, number or Array<number | boolean | string>. Inside the script they are imported using the take keyword.

Bugs

Did you find any bugs? Please send an email to "henrik" + "@" + "thoroee.com". The email should describe at least how to reproduce the error or unexpected behaviour.

Roadmap

  1. Add support for power operator (^)
  2. Add support for comments (// or #?)
  3. Clean up or rewrite the lexer and parser.
    • Both classes were quickly written, which is why they look ugly now.