Permalink
Browse files

Refactor dump script to use new API

  • Loading branch information...
1 parent 195a8a4 commit 62d9e45d595a8d17f95ff260b281dacb95e45dd9 @danmactough committed Oct 25, 2012
Showing with 6 additions and 7 deletions.
  1. +6 −7 bin/dump.js
View
13 bin/dump.js
@@ -6,15 +6,14 @@
*
*/
var util = require('util')
- , FeedParser = require('../')
- , parser = new FeedParser()
+ , feedparser = require('../')
, file = process.argv[2];
if (!file) {
process.exit(2);
}
-parser.on('error', console.error);
-parser.on('complete', function(){
- console.log(util.inspect(arguments, null, 10));
-});
-parser.parseFile(file);
+feedparser.parseFile(file)
+ .on('error', console.error)
+ .on('complete', function(){
+ console.log(util.inspect(arguments, null, 10));
+ });

0 comments on commit 62d9e45

Please sign in to comment.