README.md (6404B)
1 <!-- 2 3 @license Apache-2.0 4 5 Copyright (c) 2018 The Stdlib Authors. 6 7 Licensed under the Apache License, Version 2.0 (the "License"); 8 you may not use this file except in compliance with the License. 9 You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 18 19 --> 20 21 # Node Streams 22 23 > Standard library Node.js streams. 24 25 <section class="usage"> 26 27 ## Usage 28 29 ```javascript 30 var streams = require( '@stdlib/streams/node' ); 31 ``` 32 33 #### streams 34 35 Standard library Node.js streams. 36 37 ```javascript 38 var s = streams; 39 // returns {...} 40 ``` 41 42 The package contains the following streams: 43 44 <!-- <toc pattern="*"> --> 45 46 <div class="namespace-toc"> 47 48 - <span class="signature">[`debugSinkStream( [options,] [clbk] )`][@stdlib/streams/node/debug-sink]</span><span class="delimiter">: </span><span class="description">writable stream for debugging stream pipelines.</span> 49 - <span class="signature">[`debugStream( [options,] [clbk] )`][@stdlib/streams/node/debug]</span><span class="delimiter">: </span><span class="description">transform stream for debugging stream pipelines.</span> 50 - <span class="signature">[`emptyStream( [options] )`][@stdlib/streams/node/empty]</span><span class="delimiter">: </span><span class="description">create an "empty" readable stream.</span> 51 - <span class="signature">[`arrayStream( src[, options] )`][@stdlib/streams/node/from-array]</span><span class="delimiter">: </span><span class="description">create a readable stream from an array-like object.</span> 52 - <span class="signature">[`circularArrayStream( src[, options] )`][@stdlib/streams/node/from-circular-array]</span><span class="delimiter">: </span><span class="description">create a readable stream from a circular array-like object.</span> 53 - <span class="signature">[`constantStream( value[, options] )`][@stdlib/streams/node/from-constant]</span><span class="delimiter">: </span><span class="description">create a readable stream which always streams the same value.</span> 54 - <span class="signature">[`iteratorStream( iterator[, options] )`][@stdlib/streams/node/from-iterator]</span><span class="delimiter">: </span><span class="description">create a readable stream from an iterator.</span> 55 - <span class="signature">[`stridedArrayStream( N, buffer, stride, offset[, options] )`][@stdlib/streams/node/from-strided-array]</span><span class="delimiter">: </span><span class="description">create a readable stream from a strided array-like object.</span> 56 - <span class="signature">[`inspectSinkStream( [options,] clbk )`][@stdlib/streams/node/inspect-sink]</span><span class="delimiter">: </span><span class="description">writable stream for inspecting streamed data.</span> 57 - <span class="signature">[`inspectStream( [options,] clbk )`][@stdlib/streams/node/inspect]</span><span class="delimiter">: </span><span class="description">transform stream for inspecting streamed data.</span> 58 - <span class="signature">[`joinStream( [options] )`][@stdlib/streams/node/join]</span><span class="delimiter">: </span><span class="description">transform stream which joins streamed data.</span> 59 - <span class="signature">[`splitStream( [options] )`][@stdlib/streams/node/split]</span><span class="delimiter">: </span><span class="description">transform stream which splits streamed data.</span> 60 - <span class="signature">[`stderr`][@stdlib/streams/node/stderr]</span><span class="delimiter">: </span><span class="description">standard error.</span> 61 - <span class="signature">[`stdin`][@stdlib/streams/node/stdin]</span><span class="delimiter">: </span><span class="description">standard input.</span> 62 - <span class="signature">[`stdout`][@stdlib/streams/node/stdout]</span><span class="delimiter">: </span><span class="description">standard output.</span> 63 - <span class="signature">[`transformStream( [options] )`][@stdlib/streams/node/transform]</span><span class="delimiter">: </span><span class="description">transform stream.</span> 64 65 </div> 66 67 <!-- </toc> --> 68 69 </section> 70 71 <!-- /.usage --> 72 73 <section class="examples"> 74 75 ## Examples 76 77 <!-- TODO: better examples --> 78 79 <!-- eslint no-undef: "error" --> 80 81 ```javascript 82 var getKeys = require( '@stdlib/utils/keys' ); 83 var streams = require( '@stdlib/streams/node' ); 84 85 console.log( getKeys( streams ) ); 86 ``` 87 88 </section> 89 90 <!-- /.examples --> 91 92 <section class="links"> 93 94 <!-- <toc-links> --> 95 96 [@stdlib/streams/node/debug-sink]: https://www.npmjs.com/package/@stdlib/streams/tree/main/node/debug-sink 97 98 [@stdlib/streams/node/debug]: https://www.npmjs.com/package/@stdlib/streams/tree/main/node/debug 99 100 [@stdlib/streams/node/empty]: https://www.npmjs.com/package/@stdlib/streams/tree/main/node/empty 101 102 [@stdlib/streams/node/from-array]: https://www.npmjs.com/package/@stdlib/streams/tree/main/node/from-array 103 104 [@stdlib/streams/node/from-circular-array]: https://www.npmjs.com/package/@stdlib/streams/tree/main/node/from-circular-array 105 106 [@stdlib/streams/node/from-constant]: https://www.npmjs.com/package/@stdlib/streams/tree/main/node/from-constant 107 108 [@stdlib/streams/node/from-iterator]: https://www.npmjs.com/package/@stdlib/streams/tree/main/node/from-iterator 109 110 [@stdlib/streams/node/from-strided-array]: https://www.npmjs.com/package/@stdlib/streams/tree/main/node/from-strided-array 111 112 [@stdlib/streams/node/inspect-sink]: https://www.npmjs.com/package/@stdlib/streams/tree/main/node/inspect-sink 113 114 [@stdlib/streams/node/inspect]: https://www.npmjs.com/package/@stdlib/streams/tree/main/node/inspect 115 116 [@stdlib/streams/node/join]: https://www.npmjs.com/package/@stdlib/streams/tree/main/node/join 117 118 [@stdlib/streams/node/split]: https://www.npmjs.com/package/@stdlib/streams/tree/main/node/split 119 120 [@stdlib/streams/node/stderr]: https://www.npmjs.com/package/@stdlib/streams/tree/main/node/stderr 121 122 [@stdlib/streams/node/stdin]: https://www.npmjs.com/package/@stdlib/streams/tree/main/node/stdin 123 124 [@stdlib/streams/node/stdout]: https://www.npmjs.com/package/@stdlib/streams/tree/main/node/stdout 125 126 [@stdlib/streams/node/transform]: https://www.npmjs.com/package/@stdlib/streams/tree/main/node/transform 127 128 <!-- </toc-links> --> 129 130 </section> 131 132 <!-- /.links -->