diff options
Diffstat (limited to 'deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_duplex.js.html')
-rw-r--r-- | deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_duplex.js.html | 287 |
1 files changed, 287 insertions, 0 deletions
diff --git a/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_duplex.js.html b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_duplex.js.html new file mode 100644 index 0000000000..a3f1208b41 --- /dev/null +++ b/deps/npm/node_modules/readable-stream/coverage/lcov-report/lib/_stream_duplex.js.html @@ -0,0 +1,287 @@ +<!doctype html> +<html lang="en"> +<head> + <title>Code coverage report for lib/_stream_duplex.js</title> + <meta charset="utf-8" /> + <link rel="stylesheet" href="../prettify.css" /> + <link rel="stylesheet" href="../base.css" /> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <style type='text/css'> + .coverage-summary .sorter { + background-image: url(../sort-arrow-sprite.png); + } + </style> +</head> +<body> +<div class='wrapper'> + <div class='pad1'> + <h1> + <a href="../index.html">all files</a> / <a href="index.html">lib/</a> _stream_duplex.js + </h1> + <div class='clearfix'> + <div class='fl pad1y space-right2'> + <span class="strong">69.23% </span> + <span class="quiet">Statements</span> + <span class='fraction'>27/39</span> + </div> + <div class='fl pad1y space-right2'> + <span class="strong">68.18% </span> + <span class="quiet">Branches</span> + <span class='fraction'>15/22</span> + </div> + <div class='fl pad1y space-right2'> + <span class="strong">40% </span> + <span class="quiet">Functions</span> + <span class='fraction'>2/5</span> + </div> + <div class='fl pad1y space-right2'> + <span class="strong">75.76% </span> + <span class="quiet">Lines</span> + <span class='fraction'>25/33</span> + </div> + </div> + </div> + <div class='status-line medium'></div> +<pre><table class="coverage"> +<tr><td class="line-count quiet">1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75</td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-yes">49×</span> +<span class="cline-any cline-no"> </span> +<span class="cline-any cline-no"> </span> +<span class="cline-any cline-no"> </span> +<span class="cline-any cline-no"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-yes">49×</span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-yes">49×</span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-yes">49×</span> +<span class="cline-any cline-yes">49×</span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-yes">49×</span> +<span class="cline-any cline-yes">49×</span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-yes">49×</span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-yes">49×</span> +<span class="cline-any cline-yes">49×</span> +<span class="cline-any cline-yes">392×</span> +<span class="cline-any cline-yes">392×</span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-yes">49×</span> +<span class="cline-any cline-yes">25×</span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-yes">25×</span> +<span class="cline-any cline-yes">25×</span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-yes">25×</span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-yes">25×</span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-yes">25×</span> +<span class="cline-any cline-yes">25×</span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-yes">25×</span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-yes">49×</span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-yes">18×</span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-no"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-yes">49×</span> +<span class="cline-any cline-no"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-yes">49×</span> +<span class="cline-any cline-no"> </span> +<span class="cline-any cline-no"> </span> +<span class="cline-any cline-neutral"> </span> +<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +'use strict'; + +/*<replacement>*/ + +var objectKeys = Object.keys || <span class="fstat-no" title="function not covered" ><span class="branch-1 cbranch-no" title="branch not covered" >function (obj) {</span></span> +<span class="cstat-no" title="statement not covered" > var keys = [];</span> +<span class="cstat-no" title="statement not covered" > for (var key in obj) {</span> +<span class="cstat-no" title="statement not covered" > keys.push(key);</span> + }<span class="cstat-no" title="statement not covered" >return keys;</span> +}; +/*</replacement>*/ + +module.exports = Duplex; + +/*<replacement>*/ +var processNextTick = require('process-nextick-args'); +/*</replacement>*/ + +/*<replacement>*/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/*</replacement>*/ + +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +var keys = objectKeys(Writable.prototype); +for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; +} + +function Duplex(options) { + <span class="missing-if-branch" title="if path not taken" >I</span>if (!(this instanceof Duplex)) <span class="cstat-no" title="statement not covered" >return new Duplex(options);</span> + + Readable.call(this, options); + Writable.call(this, options); + + <span class="missing-if-branch" title="if path not taken" >I</span>if (options && options.readable === false) <span class="cstat-no" title="statement not covered" >this.readable = false;</span> + + <span class="missing-if-branch" title="if path not taken" >I</span>if (options && options.writable === false) <span class="cstat-no" title="statement not covered" >this.writable = false;</span> + + this.allowHalfOpen = true; + <span class="missing-if-branch" title="if path not taken" >I</span>if (options && options.allowHalfOpen === false) <span class="cstat-no" title="statement not covered" >this.allowHalfOpen = false;</span> + + this.once('end', onend); +} + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + <span class="missing-if-branch" title="else path not taken" >E</span>if (this.allowHalfOpen || <span class="branch-1 cbranch-no" title="branch not covered" >this._writableState.ended)</span> return; + + // no more data can be written. + // But allow more writes to happen in this tick. +<span class="cstat-no" title="statement not covered" > processNextTick(onEndNT, this);</span> +} + +<span class="fstat-no" title="function not covered" >function onEndNT(self) {</span> +<span class="cstat-no" title="statement not covered" > self.end();</span> +} + +<span class="fstat-no" title="function not covered" >function forEach(xs, f) {</span> +<span class="cstat-no" title="statement not covered" > for (var i = 0, l = xs.length; i < l; i++) {</span> +<span class="cstat-no" title="statement not covered" > f(xs[i], i);</span> + } +}</pre></td></tr> +</table></pre> +<div class='push'></div><!-- for sticky footer --> +</div><!-- /wrapper --> +<div class='footer quiet pad2 space-top1 center small'> + Code coverage + generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Wed May 18 2016 10:10:05 GMT-0400 (EDT) +</div> +</div> +<script src="../prettify.js"></script> +<script> +window.onload = function () { + if (typeof prettyPrint === 'function') { + prettyPrint(); + } +}; +</script> +<script src="../sorter.js"></script> +</body> +</html> |