summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/fstream/examples/pipe.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/fstream/examples/pipe.js')
-rw-r--r--deps/npm/node_modules/fstream/examples/pipe.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/deps/npm/node_modules/fstream/examples/pipe.js b/deps/npm/node_modules/fstream/examples/pipe.js
index c611dd5c4..3de42ef32 100644
--- a/deps/npm/node_modules/fstream/examples/pipe.js
+++ b/deps/npm/node_modules/fstream/examples/pipe.js
@@ -5,8 +5,8 @@ var r = fstream.Reader({
path: path.dirname(__dirname),
filter: function () {
return !this.basename.match(/^\./) &&
- !this.basename.match(/^node_modules$/) &&
- !this.basename.match(/^deep-copy$/)
+ !this.basename.match(/^node_modules$/) &&
+ !this.basename.match(/^deep-copy$/)
}
})
@@ -76,9 +76,9 @@ function missile (entry) {
return function (c) {
var e = Math.random() < 0.5
console.error(indent + '%s %s for %d damage!',
- entry.basename,
- e ? 'is struck' : 'fires a chunk',
- c.length)
+ entry.basename,
+ e ? 'is struck' : 'fires a chunk',
+ c.length)
}
}
@@ -86,8 +86,8 @@ function runaway (entry) {
return function () {
var e = Math.random() < 0.5
console.error(indent + '%s %s',
- entry.basename,
- e ? 'turns to flee' : 'is vanquished!')
+ entry.basename,
+ e ? 'turns to flee' : 'is vanquished!')
indent = indent.slice(0, -1)
}
}
@@ -96,7 +96,7 @@ w.on('entry', attacks)
// w.on('ready', function () { attacks(w) })
function attacks (entry) {
console.error(indent + '%s %s!', entry.basename,
- entry.type === 'Directory' ? 'calls for backup' : 'attacks')
+ entry.type === 'Directory' ? 'calls for backup' : 'attacks')
entry.on('entry', attacks)
}
@@ -112,6 +112,7 @@ r.on('end', function () {
process.on('exit', function () {
console.log((ended ? '' : 'not ') + 'ok 2 ended')
+ console.log('1..2')
})
r.pipe(w)