time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

repl.txt (3622B)


      1 
      2 {{alias}}( [options,] [clbk] )
      3     Returns a writable stream for debugging stream pipelines.
      4 
      5     If the `DEBUG` environment variable is not set, no data is logged.
      6 
      7     Providing a `name` option is *strongly* encouraged, as the `DEBUG`
      8     environment variable can be used to filter debuggers.
      9 
     10     Parameters
     11     ----------
     12     options: Object (optional)
     13         Options.
     14 
     15     options.name: string (optional)
     16         Debug namespace.
     17 
     18     options.objectMode: boolean (optional)
     19         Specifies whether a stream should operate in "objectMode". Default:
     20         false.
     21 
     22     options.highWaterMark: integer (optional)
     23         Specifies the maximum number of bytes to store in an internal buffer
     24         before ceasing to push downstream.
     25 
     26     options.decodeStrings: boolean (optional)
     27         Specifies whether to encode strings as `Buffer` objects before writing
     28         data to a returned stream. Default: true.
     29 
     30     options.defaultEncoding: string (optional)
     31         Default encoding when not explicitly specified when writing data.
     32         Default: 'utf8'.
     33 
     34     clbk: Function (optional)
     35         Callback to invoke upon receiving data.
     36 
     37     Returns
     38     -------
     39     stream: WritableStream
     40         Writable stream.
     41 
     42     Examples
     43     --------
     44     > var s = {{alias}}( { 'name': 'foo' } );
     45     > s.write( 'a' );
     46     > s.write( 'b' );
     47     > s.write( 'c' );
     48     > s.end();
     49 
     50 
     51 {{alias}}.factory( [options] )
     52     Returns a function for creating writable streams for debugging stream
     53     pipelines.
     54 
     55     Parameters
     56     ----------
     57     options: Object (optional)
     58         Options.
     59 
     60     options.objectMode: boolean (optional)
     61         Specifies whether a stream should operate in "objectMode". Default:
     62         false.
     63 
     64     options.highWaterMark: integer (optional)
     65         Specifies the maximum number of bytes to store in an internal buffer
     66         before ceasing to push downstream.
     67 
     68     options.decodeStrings: boolean (optional)
     69         Specifies whether to encode strings as `Buffer` objects before writing
     70         data to a returned stream. Default: true.
     71 
     72     options.defaultEncoding: string (optional)
     73         Default encoding when not explicitly specified when writing data.
     74         Default: 'utf8'.
     75 
     76     Returns
     77     -------
     78     createStream( name[, clbk] ): Function
     79         Function for creating writable streams.
     80 
     81     Examples
     82     --------
     83     > var opts = { 'objectMode': true, 'highWaterMark': 64 };
     84     > var createStream = {{alias}}.factory( opts );
     85 
     86 
     87 {{alias}}.objectMode( [options,] [clbk] )
     88     Returns an "objectMode" writable stream for debugging stream pipelines.
     89 
     90     Parameters
     91     ----------
     92     options: Object (optional)
     93         Options.
     94 
     95     options.name: string (optional)
     96         Debug namespace.
     97 
     98     options.highWaterMark: integer (optional)
     99         Specifies the maximum number of objects to store in an internal buffer
    100         before ceasing to push downstream.
    101 
    102     options.decodeStrings: boolean (optional)
    103         Specifies whether to encode strings as `Buffer` objects before writing
    104         data to a returned stream. Default: true.
    105 
    106     options.defaultEncoding: string (optional)
    107         Default encoding when not explicitly specified when writing data.
    108         Default: 'utf8'.
    109 
    110     clbk: Function (optional)
    111         Callback to invoke upon receiving data.
    112 
    113     Returns
    114     -------
    115     stream: WritableStream
    116         Writable stream operating in "objectMode".
    117 
    118     Examples
    119     --------
    120     > var s = {{alias}}.objectMode( { 'name': 'foo' } );
    121     > s.write( { 'value': 'a' } );
    122     > s.write( { 'value': 'b' } );
    123     > s.write( { 'value': 'c' } );
    124     > s.end();
    125 
    126     See Also
    127     --------
    128