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

tep

v0.0.3

Published

(Task Executing Processes)

Readme

tep

A task managing library.

NOTE: This is a hobby project, mainly written for my own use.

Getting started

npm i tep

Top Level API

The top level API has various functions for easy task managing.

tep.exec(task, [settings]) // Execute a task

tep.serial([ task... ])  // Execute several tasks, one at a time
tep.parallel([ task... ]) // Execute several tasks, all at once
tep.fork(file, taskLabel) // Execute a task in a new process

tep.task(func) // Create a task that executes that function
tep.name(name, func) // Rename a function (or name an anonymous function)

tep.exec([
  gotoStore,
  purchaseGroceries,
  goHome,
  tep.parallel([
    tep.serial([ fillPot, boilWater, cookPasta, drain ]),
    makeTable,
  ]),
]));

You can also check out the examples folder for more code examples.

Terminology

These are some terms that are regularly used throughout the library.

  • Task: A function that expects no arguments and returns a promise.
  • Meta Task: A task that is a composition of other tasks. It's promise usually resolves once all composed tasks have been executed.
  • Task Fork: A process that is dedicated to executing tasks. Can transmit messages to/from it's parent process.

API

exec(task, [settings]) => Promise<void>

Execute one or more tasks.

When executing multiple tasks, this acts like a "serial" by default.

serial([name], tasks, [settings]) => Task

Compose a meta task.

When the meta task is executed, it executes the tasks one at a time.

It's promise resolves once all tasks are done executing.

parallel([name], tasks, [settings]) => Task

Compose a meta task.

When the meta task is executed, it executes the tasks all at the same time.

It's promise resolves once all tasks are done executing.

fork(entry, taskLabel) => Task

Compose a meta task.

When the meta task is executed, it:

  • Starts a new Node.js child process with entry as the entry file.
  • Then instructs the process to execute the task(s) with the provided task label(s).

It's promise resolves once all tasks are done executing.

The process is killed once the execution ends.

task([name], func) => Task

Create a task that executes the provided function.

If the provided function already is a task, it will be wrapped in another task.

If a name is provided, the task will be given that name (otherwise it will be given the name of the function).

name(name, func) => Function

Rename a function.