A variety of streams to be used in samples and/or tests.
npm install stream-spectrum
-
Generates increasing numbers between the given from and to values.
Name Type Description opts
Object options
Name Type Argument Description from
Number <optional>
start value to generate
to
Number <optional>
end value to generate
throttle
Number <optional>
number of milliseconds to take to generate each number
- Source:
readable
- Type
- ReadableStream
-
Generates objects with a count property that increases between the given from and to values.
Name Type Description opts
Object options
Name Type Argument Description from
Number <optional>
start value to generate
to
Number <optional>
end value to generate
throttle
Number <optional>
number of milliseconds to take to generate each number
- Source:
readable
- Type
- ReadableStream
-
Transforms numbers into the power of each number.
Name Type Description opts
Object options
Name Type Argument Description throttle
Number <optional>
number of milliseconds to take to transform each number into its power
- Source:
transform
- Type
- TransformStream
-
Generates random numbers between the given min and max values.
Name Type Description opts
Object options
Name Type Argument Description min
Number <optional>
minimum value to generate
max
Number <optional>
maximum value to generate
throttle
Number <optional>
number of milliseconds to take to generate each number
- Source:
readable
- Type
- ReadableStream
-
Just drops the values written to it. Simulates processing time via throttle value
Name Type Description opts
Object options
Name Type Argument Description debug
Boolean <optional>
if true written values are logged to the console
throttle
Number <optional>
number of milliseconds to delay each written chunk
- Source:
writable
- Type
- WritableStream
generated with docme
MIT