Comparing version 0.1.0 to 0.1.1
// Without this line, you'll get an EPIPE error on: | ||
// 'node example.js | head -1' | ||
// 'node example.js | head' | ||
require('./epipebomb.js')() | ||
for (var i = 0; i < 100; i++) console.log(i) | ||
;(function log() { | ||
console.log('tick') | ||
process.nextTick(log) | ||
})() |
@@ -5,3 +5,3 @@ { | ||
"description": "Destroy EPIPE errors when stdout runs through a truncated pipe", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"homepage": "https://github.com/mhart/epipebomb", | ||
@@ -8,0 +8,0 @@ "repository": { |
@@ -13,3 +13,6 @@ # EPIPE Bomb | ||
```javascript | ||
for (var i = 0; i < 100; i++) console.log(i) | ||
;(function log() { | ||
console.log('tick') | ||
process.nextTick(log) | ||
})() | ||
``` | ||
@@ -20,11 +23,20 @@ | ||
```shell | ||
$ node example.js | head -1 | ||
0 | ||
$ node example.js | head | ||
tick | ||
tick | ||
tick | ||
tick | ||
tick | ||
tick | ||
tick | ||
tick | ||
tick | ||
tick | ||
node.js:201 | ||
throw e; // process.nextTick error, or 'error' event on first tick | ||
^ | ||
events.js:66 | ||
throw arguments[1]; // Unhandled 'error' event | ||
^ | ||
Error: write EPIPE | ||
at errnoException (net.js:670:11) | ||
at Object.afterWrite [as oncomplete] (net.js:503:19) | ||
at errnoException (net.js:782:11) | ||
at Object.afterWrite (net.js:600:19) | ||
``` | ||
@@ -38,3 +50,6 @@ | ||
for (var i = 0; i < 100; i++) console.log(i) | ||
;(function log() { | ||
console.log('tick') | ||
process.nextTick(log) | ||
})() | ||
``` | ||
@@ -44,4 +59,13 @@ | ||
```shell | ||
$ node example.js | head -1 | ||
0 | ||
$ node example.js | head | ||
tick | ||
tick | ||
tick | ||
tick | ||
tick | ||
tick | ||
tick | ||
tick | ||
tick | ||
tick | ||
``` | ||
@@ -48,0 +72,0 @@ |
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
2351
23
72
1