-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated to Node 10.10 * fix failing test, the code is correct
- Loading branch information
Showing
16 changed files
with
421 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
'use strict'; | ||
|
||
/*<replacement>*/ | ||
require('babel-polyfill'); | ||
var util = require('util'); | ||
for (var i in util) { | ||
exports[i] = util[i]; | ||
} /*</replacement>*/ /* eslint-disable node-core/required-modules */ | ||
'use strict'; | ||
|
||
/*<replacement>*/ | ||
var objectKeys = objectKeys || function (obj) { | ||
var keys = []; | ||
for (var key in obj) { | ||
keys.push(key); | ||
}return keys; | ||
}; | ||
/*</replacement>*/ | ||
|
||
var _require = require('../../'), | ||
Stream = _require.Stream; | ||
|
||
var _require2 = require('util'), | ||
inherits = _require2.inherits; | ||
|
||
function noop() {} | ||
|
||
// A stream to push an array into a REPL | ||
function ArrayStream() { | ||
this.run = function (data) { | ||
var _this = this; | ||
|
||
forEach(data, function (line) { | ||
_this.emit('data', line + '\n'); | ||
}); | ||
}; | ||
} | ||
|
||
inherits(ArrayStream, Stream); | ||
ArrayStream.prototype.readable = true; | ||
ArrayStream.prototype.writable = true; | ||
ArrayStream.prototype.pause = noop; | ||
ArrayStream.prototype.resume = noop; | ||
ArrayStream.prototype.write = noop; | ||
|
||
module.exports = ArrayStream; | ||
|
||
function forEach(xs, f) { | ||
for (var i = 0, l = xs.length; i < l; i++) { | ||
f(xs[i], i); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.