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

tasklanguage

v2.5.2

Published

tasks handle for js/ts

Readme

Task Language

Mimicking assembly. Easy to visualize, modify and boost production speed.

Intro:

  • Event loop? Never heard of that.
  • setTimeout? Why should I use that?
  • Promises? Don't promise something you can't do.
  • Here, let me introduce the task language, aka SWEATSHOP, to you.
  • Simple to use, simple to implement, but most importantly, it's free.

What's new

{
  "2.5.2": add RUNMARK()
  "2.5.0": run() can exit on specific mark
  "2.4.3": fix error and silence the SUBTASK EXIT message
  "2.4.1": replace _EXECUTE with SUBTASK
  "2.3.1": support inner jump SKIP within _EXECUTE
}

What's Ancient

Usage

Let's just jump into it.

var { TaskLanguage } = require("tasklanguage");

let task = new TaskLanguage();

task.ADDLookup({
  bingo: (word, w2) => console.log(word + w2)
});
task.ADDCommand(
  task.MARK("h0"),
  task.INJECT((mem, index) => {
    console.log("hi1");
  }),
  task.JUMP("v3"),
  task.INJECT((mem, index) => {
    console.log("hi2");
  }),
  task.MARK("v3"),
  task.INJECT((mem, index) => {
    console.log("hi3");
  }),
  task.WAIT(mem => mem.book != undefined),
  task.INJECT((mem, index) => {
    if (!mem.page) return (mem.page = 1);
    mem.page += 1;
  }),
  task.JUMPIF((mem, index) => mem.page > 5, undefined, "v3"),
  task.LABOR("bingo", "pp ", "hard")
);

task.RUN();
setTimeout(() => task.SETMemory({ book: "interesting" }), 5000);
// 1.6.2 & later
task.ADDCommand((mem, index) => {
  console.log(mem, index);
});
// 2.0.0 & later
let ballRP = (ball = number => console.log("bucket", number));
ballRP = task.ADDLookup({ ball }).ball;
task.ADDCommand(ballRP(7));

API

ADDCommand(...commands: any)

add commands to the command list.

ADDLookup(pairs: { [key: string]: Function })

add user defined functions to the lookupmap

ADDLookupCommand(...functions: Function[])

add user defined functions to the lookupmap

ADDSignalMap(pairs: {})

add user defined exit code and message to the signalmap

SETMemory(pairs: {})

publicly setting the inner memory for command list

RUN(indexOrMark: number | string = 0, exits?: number | string)

running from beginning (index = 0) or specific mark. & exiting on specific mark.

RUNMARK(...MARKS : string[])

run specific mark range, end 'til next mark.

MARK(name: string)

Generate Marking

JUMP(indexOrMark: number | string)

Jump to the mark or the index of the whole commands array

JUMPIF(condition: (memory: {}, index: number) => any,trueDest?: number | string,falseDest?: number | string)

condition: function, takes in current MEMORY as first param, current index as second param.

trueDest: index or mark when condition returned true

falseDest: index or mark when condition returned false

INJECT(callback: (memory: {}, index: number) => any)

callback: function, takes in current MEMORY as first param, current index as second param.

SUBTASK(...commands: any)

execute subcommands, shared memory, lookupmap, signalmap, but not MARK

WAIT(exitCondition: number | ((memory: {}, index: number) => any))

exitCondition : ms(*1000 to be second) or callback, the condition check rate is every second.

SKIP()

within _EXECUTE, JUMP to the end

RESET(clearMemory = false)

reset the current task progress

EXIT(exitCode: string, error?: String | Promise)

exitCode :

{ "-1" : program terminated after finish,
  "-2" : program terminated by user,
  "-3" : program exit with error }

error: can be self defined string.

_EXECUTE(...commands: any)

similar to SUBTASK, but can actually execute commands, Better use it WITHIN a function. replace original with subtask

_CUTINLINE(...commands: any)

will use _EXECUTE right after current command.

LABOR(userKey: string | function, ...args: any)

userKey: the name of your function that you want to run (MUST BE PREDEFINED)

args: the arguments of the function.

previousResult

the temporary storage of the last result