callback-buffering

Installation
Run the following commands to download and install the application:
$ clone callback-buffering
$ cd callback-buffering
$ npm install
Documentation
CbBuffer()
Creates a new instance of CbBuffer
.
Example:
var cb = new CbBuffer();
Return
done(clb)
Calls the callback function provided as the first
parameter with cached arguments.
Params
- Function
clb
: The callback function to be called.
Return
- Object The
CbBuffer
instance.
wait()
Sets isWaiting
flag to true
.
Return
- Object The
CbBuffer
instance.
callback()
Fires all callbacks from the buffer end empties the it.
Return
- Object The
CbBuffer
instance.
add(func)
Adds functions to the current buffer.
Params
- Function
func
: The function that should be buffered.
Return
- Object The
CbBuffer
instance.
How to contribute
- File an issue in the repository, using the bug tracker, describing the
contribution you'd like to make. This will help us to get you started on the
right foot.
- Fork the project in your account and create a new branch:
your-great-feature
. - Commit your changes in that branch.
- Open a pull request, and reference the initial issue in the pull request
message.
License
See the LICENSE file.