index.js (4344B)
1 /** 2 * @license Apache-2.0 3 * 4 * Copyright (c) 2018 The Stdlib Authors. 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 'use strict'; 20 21 /* 22 * When adding modules to the namespace, ensure that they are added in alphabetical order according to module name. 23 */ 24 25 // MODULES // 26 27 var setReadOnly = require( '@stdlib/utils/define-read-only-property' ); 28 29 30 // MAIN // 31 32 /** 33 * Top-level namespace. 34 * 35 * @namespace streams 36 */ 37 var streams = {}; 38 39 /** 40 * @name debugStream 41 * @memberof streams 42 * @readonly 43 * @type {Function} 44 * @see {@link module:@stdlib/streams/node/debug} 45 */ 46 setReadOnly( streams, 'debugStream', require( './../../node/debug' ) ); 47 48 /** 49 * @name debugSinkStream 50 * @memberof streams 51 * @readonly 52 * @type {Function} 53 * @see {@link module:@stdlib/streams/node/debug-sink} 54 */ 55 setReadOnly( streams, 'debugSinkStream', require( './../../node/debug-sink' ) ); 56 57 /** 58 * @name emptyStream 59 * @memberof streams 60 * @readonly 61 * @type {Function} 62 * @see {@link module:@stdlib/streams/node/empty} 63 */ 64 setReadOnly( streams, 'emptyStream', require( './../../node/empty' ) ); 65 66 /** 67 * @name arrayStream 68 * @memberof streams 69 * @readonly 70 * @type {Function} 71 * @see {@link module:@stdlib/streams/node/from-array} 72 */ 73 setReadOnly( streams, 'arrayStream', require( './../../node/from-array' ) ); 74 75 /** 76 * @name circularArrayStream 77 * @memberof streams 78 * @readonly 79 * @type {Function} 80 * @see {@link module:@stdlib/streams/node/from-circular-array} 81 */ 82 setReadOnly( streams, 'circularArrayStream', require( './../../node/from-circular-array' ) ); 83 84 /** 85 * @name constantStream 86 * @memberof streams 87 * @readonly 88 * @type {Function} 89 * @see {@link module:@stdlib/streams/node/from-constant} 90 */ 91 setReadOnly( streams, 'constantStream', require( './../../node/from-constant' ) ); 92 93 /** 94 * @name iteratorStream 95 * @memberof streams 96 * @readonly 97 * @type {Function} 98 * @see {@link module:@stdlib/streams/node/from-iterator} 99 */ 100 setReadOnly( streams, 'iteratorStream', require( './../../node/from-iterator' ) ); 101 102 /** 103 * @name stridedArrayStream 104 * @memberof streams 105 * @readonly 106 * @type {Function} 107 * @see {@link module:@stdlib/streams/node/from-strided-array} 108 */ 109 setReadOnly( streams, 'stridedArrayStream', require( './../../node/from-strided-array' ) ); 110 111 /** 112 * @name inspectStream 113 * @memberof streams 114 * @readonly 115 * @type {Function} 116 * @see {@link module:@stdlib/streams/node/inspect} 117 */ 118 setReadOnly( streams, 'inspectStream', require( './../../node/inspect' ) ); 119 120 /** 121 * @name inspectSinkStream 122 * @memberof streams 123 * @readonly 124 * @type {Function} 125 * @see {@link module:@stdlib/streams/node/inspect-sink} 126 */ 127 setReadOnly( streams, 'inspectSinkStream', require( './../../node/inspect-sink' ) ); 128 129 /** 130 * @name joinStream 131 * @memberof streams 132 * @readonly 133 * @type {Function} 134 * @see {@link module:@stdlib/streams/node/join} 135 */ 136 setReadOnly( streams, 'joinStream', require( './../../node/join' ) ); 137 138 /** 139 * @name splitStream 140 * @memberof streams 141 * @readonly 142 * @type {Function} 143 * @see {@link module:@stdlib/streams/node/split} 144 */ 145 setReadOnly( streams, 'splitStream', require( './../../node/split' ) ); 146 147 /** 148 * @name stderr 149 * @memberof streams 150 * @readonly 151 * @type {Function} 152 * @see {@link module:@stdlib/streams/node/stderr} 153 */ 154 setReadOnly( streams, 'stderr', require( './../../node/stderr' ) ); 155 156 /** 157 * @name stdin 158 * @memberof streams 159 * @readonly 160 * @type {Function} 161 * @see {@link module:@stdlib/streams/node/stdin} 162 */ 163 setReadOnly( streams, 'stdin', require( './../../node/stdin' ) ); 164 165 /** 166 * @name stdout 167 * @memberof streams 168 * @readonly 169 * @type {Function} 170 * @see {@link module:@stdlib/streams/node/stdout} 171 */ 172 setReadOnly( streams, 'stdout', require( './../../node/stdout' ) ); 173 174 /** 175 * @name transformStream 176 * @memberof streams 177 * @readonly 178 * @type {Function} 179 * @see {@link module:@stdlib/streams/node/transform} 180 */ 181 setReadOnly( streams, 'transformStream', require( './../../node/transform' ) ); 182 183 184 // EXPORTS // 185 186 module.exports = streams;