Skip to content

Commit

Permalink
using util.inherits
Browse files Browse the repository at this point in the history
  • Loading branch information
mafintosh committed Jul 31, 2013
1 parent 4ff7ea1 commit 942cf51
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var mongodb = require('mongodb');
var thunky = require('thunky');
var util = require('util');
var Readable = require('stream').Readable || require('readable-stream');

var DRIVER_COLLECTION_PROTO = mongodb.Collection.prototype;
Expand Down Expand Up @@ -36,7 +37,7 @@ var Cursor = function(oncursor) {
this._get = oncursor;
};

Cursor.prototype.__proto__ = Readable.prototype;
util.inherits(Cursor, Readable);

Cursor.prototype.toArray = function() {
this._apply(DRIVER_CURSOR_PROTO.toArray, arguments);
Expand Down

0 comments on commit 942cf51

Please sign in to comment.