Sugar syntax to break the hell of pyramid code when dealing with asynchronous callbacks.

npm install pyramid-breaker
2 downloads in the last week
4 downloads in the last month

Pyramid Breaker

A nice syntaxic sugar to break down the pyramid syntax when dealing with asynchronous (and even synchronous) code in javascript.

Getting Started

Install the module with: npm install pyramid-breaker

var pyramid = require('pyramid-breaker');


If you are interrested in the syntax and how it should be used, watch the tests. They are made to be clear and understandable by anyone.


The simplest example: executing some function with no handler {
  //regular code

More complex: we execute a handler by the end of the execution of some function

var handling = {
  //some other code
handling.with(function() {
  //some handling stuff
//once built, we launch the function with its handler


In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

(Nothing yet)


Copyright (c) 2013 Thomas Bracher
Licensed under the MIT license.

npm loves you