pyramid-breaker

0.1.0 • Public • Published

#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');

Documentation

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.

Examples

The simplest example: executing some function with no handler

pyramid.do(function() {
  //regular code
})();

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

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

Contributing

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)

License

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

Readme

Keywords

none

Package Sidebar

Install

npm i pyramid-breaker

Weekly Downloads

0

Version

0.1.0

License

none

Last publish

Collaborators

  • thomasbracher