lib/main.js
function Extractor(ac , options) {
    EventEmitter.call(this);
    var self = this;
    self.matchers = [];
    self.vars = ac || {};
    self.options = options || {};
    self.watchers = [];
    self._listen = function (car, file) {
        car.once('end', function () {
            self.emit('end', self.vars);
        });
        car.on('line', function (line) {
            var i;
            var firstMatch = true;
            for (i = 0; i < self.matchers.length; i++) {
                var matcher = self.matchers[i];
                var m;
                while(matcher.handler && (m = matcher.re.exec(line)) !== null){
                    matcher.handler(m, self.vars, file , firstMatch);
                    firstMatch = false;
                    if(!self.options.successive){
                        i = self.matchers.length;
                        break;
                    }
                }
            }
        });
        return self;
    };
}
function Extractor(ac , options) {
    EventEmitter.call(this);
    var self = this;
    self.matchers = [];
    self.vars = ac || {};
    self.options = options || {};
    self.watchers = [];
    self._listen = function (car, file) {
        car.once('end', function () {
            self.emit('end', self.vars);
        });
        car.on('line', function (line) {
            var i;
            var firstMatch = true;
            for (i = 0; i < self.matchers.length; i++) {
                var matcher = self.matchers[i];
                var m;
                while(matcher.handler && (m = matcher.re.exec(line)) !== null){
                    matcher.handler(m, self.vars, file , firstMatch);
                    firstMatch = false;
                    if(!self.options.successive){
                        i = self.matchers.length;
                        break;
                    }
                }
            }
        });
        return self;
    };
}
function Extractor ( ac , options ) { EventEmitter . call ( this ) ; var self = this ; self . matchers = [ ] ; self . vars = ac || { } ; self . options = options || { } ; self . watchers = [ ] ; self . _listen = function ( car , file ) { car . once ( 'end' , function ( ) { self . emit ( 'end' , self . vars ) ; } ) ; car . on ( 'line' , function ( line ) { var i ; var firstMatch = true ; for ( i = 0 ; i < self . matchers . length ; i ++ ) { var matcher = self . matchers [ i ] ; var m ; while ( matcher . handler && ( m = matcher . re . exec ( line ) ) !== null ) { matcher . handler ( m , self . vars , file , firstMatch ) ; firstMatch = false ; if ( ! self . options . successive ) { i = self . matchers . length ; break ; } } } } ) ; return self ; } ; }
Extractor Object.
Extractor Object .