Skip to content
Browse files

Update docs for new node.js API

  • Loading branch information...
1 parent 5131a0c commit 7e8999df2d1d153aba72b426c24238ec96a3e890 @akaspin committed Jul 21, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 readme.md
View
8 readme.md
@@ -33,8 +33,8 @@ Basic usage is very simple:
if (err) throw err;
var buffer = '';
- output.addListener('data', function(data){ buffer += data; })
- .addListener('end', function(){ sys.puts(buffer) });
+ output.on('data', function(data){ buffer += data; })
+ .on('end', function(){ sys.puts(buffer) });
});
template.html
@@ -70,8 +70,8 @@ Instead of rendering the template can be compiled for future use.
var buffer = '';
template(ctx)
- .addListener('data', function(data){ buffer += data; })
- .addListener('end', function(){ sys.puts(buffer) });
+ .on('data', function(data){ buffer += data; })
+ .on('end', function(){ sys.puts(buffer) });
});
To run the tests:

0 comments on commit 7e8999d

Please sign in to comment.
Something went wrong with that request. Please try again.