Bones/node_modules/formidable/lib/octet_parser.js
SOUTHERNCO\x2mjbyrn 7efe7605b8 Template Upload
2017-05-17 13:45:25 -04:00

21 lines
456 B
JavaScript

var EventEmitter = require('events').EventEmitter
, util = require('util');
function OctetParser(options){
if(!(this instanceof OctetParser)) return new OctetParser(options);
EventEmitter.call(this);
}
util.inherits(OctetParser, EventEmitter);
exports.OctetParser = OctetParser;
OctetParser.prototype.write = function(buffer) {
this.emit('data', buffer);
return buffer.length;
};
OctetParser.prototype.end = function() {
this.emit('end');
};