diff options
Diffstat (limited to 'node_modules/init-package-json/test/lib/common.js')
-rw-r--r-- | node_modules/init-package-json/test/lib/common.js | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/node_modules/init-package-json/test/lib/common.js b/node_modules/init-package-json/test/lib/common.js deleted file mode 100644 index de45089f9..000000000 --- a/node_modules/init-package-json/test/lib/common.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports.drive = drive - -var semver = require('semver') - -function drive (input) { - var stdin = process.stdin - function emit (chunk, ms) { - setTimeout(function () { - stdin.emit('data', chunk) - }, ms) - } - if (semver.gte(process.versions.node, '0.11.0')) { - input.forEach(function (chunk) { - stdin.push(chunk) - }) - } else { - stdin.once('readable', function () { - var ms = 0 - input.forEach(function (chunk) { - emit(chunk, ms += 50) - }) - }) - } -} |