0.0.6 • Published 11 years ago

damage v0.0.6

Weekly downloads
10
License
-
Repository
github
Last release
11 years ago

damage

A simple way to calculate the damage a task in Node.JS.

Installation

$ npm install damage

Calculating the damage

Create a file requiring damage and running damage(). Just like this:

var damageOf = require('damage');
var fs = require('fs');

//        \/ Task's description
damageOf('reading a file',function (done) {
  
  // Put the task here..
  
  fs.readFile(__filename,done);
  //                      /\ Function to be called when the task is done.
  
},1000);
// /\ How many times

Manipulating the result

You can intercept the result display and do what ever you want with it.

// Same code as before
var damageOf = require('damage');
var fs = require('fs');

damageOf('reading a file',function (done) {
  fs.readFile(__filename,done);
},1000)

// Add \/ after the damage.
.is(function (result) {
  fs.writeFile('output.log',result);
})
0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago