Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Documentation added

  • Loading branch information...
commit 47b77a2ee92efc6c2cb23704778a98a0ce255538 1 parent 1d75055
@arunoda authored
Showing with 58 additions and 0 deletions.
  1. +58 −0 readme.md
View
58 readme.md
@@ -0,0 +1,58 @@
+QBox - Flow Control library for NodeJS
+=======================================
+
+Introduction
+------------
+
+There are whole a bunch of NodeJS Flow Control libraries exists.
+In order to use most of them you need change the way how you program.
+Or learn some new syntax.
+
+*Qbox* is meant for people who loves to code using their natural style
+but also to control the flow of the code as they wish.
+
+Install
+---------
+npm install qbox
+
+Usage
+-----
+
+### Complete After Something happens
+
+I need to do some tasks after I connect've connect with the database
+
+var db = qbox.create();
+
+mydatabase.connect(function() {
+ $.start();
+});
+
+$.ready(function() {
+ //do something
+});
+
+//at somewhere else in your programme
+$.ready(function() {
+ //do some other stuff
+});
+
+### Complete After Some Few things happens
+
+I need to do some task after I'm connected to database and registry
+
+var go = qbox.ready(['db', 'registry']);
+
+mydatabase.connect(function() { go.tick('db'); });
+registry.connect(function() { go.tick('db'); });
+
+go.ready(function() {
+ //do something
+});
+
+//timeout after 5 seconds
+go.timeout(5000, function() {
+ //show the errors
+});
+
+Browse [Tests](https://github.com/arunoda/qbox/blob/master/tests/qbox.js) for more usage patterns
Please sign in to comment.
Something went wrong with that request. Please try again.