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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ebb

v0.0.2

Published

simple and sequential Javascript control flow

Downloads

2

Readme

ebb

ebb lets you unwind JavaScript callback chains in a natural and non-assumptive way. Unlike other libraries, ebb does not wrap itself around the callback chain and it allows you to use the natural callback signatures of async methods just as they were designed. The result is more readable, flexible, and maintainable code.

Why ebb?

No assumptions - Other flow control libraries rely on callback chaining and assume all of your execution steps are signature compatible. With ebb you have to manually manage the step execution, but you benefit from increased flexibility.

Contextual Execution - ebb maintains the execution context along the execution path. This makes it easy to manage and chain complex result structures and coordinate disjoint ebb steps in a simple and consistent manner.

Error Handling - With ebb, you have the option of including 'catch' and 'finally' blocks in your call sequence. At any point during the flow you can throw an error and cleanly handle it in a familiar way.

Step Tracing - ebb bakes in step tracing and context inspection to help diagnose and debug complex flow logic. Tracing can be selectively added to individual flows and enabled/disabled globally.

A simple ebb flow

var message = 'Ebb ';

ebb.flow(null, {
    doThis: function (flow) {
        message += "is a simple ";
    },
    thenThat: function (flow) {
        setTimeout(flow.join(function () {
            message += "way to ";
        }), 250);
    },
    evenNested: function (flow) {
        ebb.flow(this, {
            dangerous: function (flow) {
                process.nextTick(flow.join(function () {
                    throw "code async.";
                }));
            },
            catch: function (flow, e) {
                message += e;
            }
        }).join(flow); // chain to parent flow!
    },
    finally: function (flow) {
        console.log(message);
    }
}).trace({name: 'myFlow', inspect: true});

What about async, step, etc?

There are many other popular control flow packages worth considering - particularly for more advanced usage, and I often use those packages in conjunction with ebb. Unlike those more complex solutions, ebb is designed specifically for sequenced execution and natural error handling. You can accomplish both of those things using async, step, or otherwise, but doing them in ebb is just more fun!

Install

npm install ebb

License

MIT