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

monkeybars

v0.9.14

Published

Task library that provides a simple structure for handling singular, sequential and parallel units of code.

Readme

MonkeyBars

A task based library that provides a simple structure for handling singular, sequential and parallel units of code.

The overall architecture is based off of the composite and decorator patterns. These patterns lend themselves very well to a task based library, where tasks can contain other tasks all contributing to the overall flow of an operation.

Installation

The library itself has no ties to the browser, and because of this it works both in client side & server side javascript projects. Include monkeybars.min.js for your client side projects or install using npm by running the following command from within your project:

Implementation

Simple Task

Monkeybars.Task is the simplest form of a task possible. You can override any of the methods provided (granted you must then call the prototype version of the method), but in its simplest form a task only requires the performTask method to be present. For a list of all possible methods and properties available have a look at the documentation.

Task Groups

Task groups are a great way to contain and structure both serial and async units of code. There are numerous syntax variations that you can use in order to create and add subtasks to a task group. Have a look at the group, parallel and sequence specs within the tests directory for all of the possible variations.

Extending

In some cases you may have a need for more specific functionality then what is provided with the simple, parallel and sequence task types. It is very simple to extend the base functionality of a specific task type to bake your own.

Decorators

There are three decorators (for, when and where) available for all three types of tasks(simple, parallel, and sequence). If you set a count on a task it will itterate for that count total. If you have a when method as a task attribute the task will only run when that method returns true. And if you have a while method the task will continuously run until that method returns false.

For Decorator

When Decorator

When Decorator

Documentation

Full documentation can be seen from within the docs directory of this project.

Nesting

As stated above the tasks within the library implement the composite design pattern, this simply means that all groups of tasks are themselves tasks. Tasks have the ability to have sub tasks nested within them, turning them into task groups. By default nested tasks run sequentially, unless otherwise specified. Currently the two types of task groups available are sequence and parallel (implementation examples above).

Sequential tasks run sub tasks one after another until all sub tasks complete. When all nested sub tasks are complete the complete state is passed to the task groups change method for handling.

Parallel tasks are task groups who's nested subtasks are executed side by side, executing whenever they can. Just like the sequential task group, when all sub tasks have completed the groups change method will be notified.

There is no limit to the depth of which you nest tasks, which is where the power of the library starts to become apparent. You can view a more complex example of this in the complex example within the examples directory.

Examples

Examples for the library can be found in the examples directory of this project.