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

escalator

v0.2.9

Published

a javascript flow-control || step-wise execution system with between-step delays and in-execution step-manipulation and errorHandling

Downloads

7

Readme

escalator

a flow-control class for javascript (nodeJS & browser)

DESCRIPTION

in async environments - we do love them - there are times when you need to make sure foo is run after bar in all cases. for our VisualWeb framework we thus developed a object/class called escalator that allows us to write sequential code.

  • this code is part of the VisualWeb Project by * LinkCloud ( http://www.mylinkcloud.com ) * ViSERiON UG (haftungsbeschraenkt) ( http://www.viserion.com )

  • K!Lab GmbH ( http://www.klab-berlin.com )

  • MIT license.

  • AUTHOR: Toni Wagner @itsatony

USPs

  • escalator offers DELAYS between steps. These are handy to make your app more response during cpu/load intensive code sequences. For example timeouts are a good idea to update upload/downloaf/progress bars
  • escalator offers setting of code-SCOPE PER STEP, thus enabling you to control the memory environment your steps are run in.
  • escalator offers a CONSTANT NAMESPACE, actually its own namespace, which is made available (passed as an additional call parameter) to every step. Thus, exchange of data between steps is super-easy and straightforward.
  • escalator objects can PERSIST with fully running and debugging info if you want that.
  • escalator offers a debug/logging mode that will record the time each step takes. very handy for performance optimization and error tracing
  • escalator wraps each step-call into a try-catch and allows you to define the errorhandler.
  • escalator steps can control the flow of efficiently, even stop the complete escalator with a message.

DEPENDENCIES

  • dependencies were removed ... this is totally independent now .
  • it should integrate into NodeJS on the server-side or any browser-side with javascript enabled.

TESTS

  • none yet ;(

VERSIONS

    • v0.2.8 added onError checking and upon catchError onError will be called. if not there the escalator finishes.
  •  - v0.2.2	fixes to default add values		18.12.2013	
  •  - v0.2.0	initial public release		15.11.2012	
     	- bug fixes
     	  - better error handling of steps
       	- optional try-catching of steps (allows for js engines to run optimizations if turned off)
  • v0.1.0 initial public release 08.05.2012
    • removed dependencies
    • enabled using the same file for client- and nodeJS server-side implementation

URLs

CODE EXAMPLES

  • 1 - three steps, different configs
 	var someVar = 'hello';
 	var firstStep = {
		id: 'myFirstStep',
		priority: 10,
		executor: function(next, thisEscalator) {
			someVar = 'hello too'
			next();
		}
	};
	var secondStep = {
		id: 'mySecondStep',
		priority: 20,
		delay: 10,
		parameters: [ someVar ],
		scope: this,
		executor: function(somethingWePassedIn, next, thisEscalator) {
			console.log(somethingWePassedIn);
			thisEscalator.anotherVariable = 42;
			next();
		}
	};	
	var lastStep = {
		priority: 22,
		executor: function(next, thisEscalator) {
			console.log(thisEscalator.anotherVariable);
			next();
		}
	};
	var myDemoEscalator = new escalator(
		'demoEscalator',
		[ firstStep, secondStep, lastStep ]
	).start();