Class: Diagnose

Defined in: src/diagnose.coffee
Inherits: stream.Transform

Overview

Output the diagnostic format from a stream of CBOR bytes.

Class Method Summary

Class Method Details

. (undefined, Promise) diagnose(input, encoding, cb)

Convenience function to return a string in diagnostic format. @param encoding the encoding, if input is a string (defaults to 'hex')

Parameters:

  • input ( Buffer,String ) the CBOR bytes to write
  • cb ( function(error, String) )

Returns:

  • ( undefined, Promise ) — if cb is not specified, returns a Promise fulfilled with the diagnostic string

Constructor Details

# (void) constructor(options = {})

Create a Diagnose.

Parameters:

  • options ( Object ) options for creation

Options Hash: (options):

  • separator ( String ) output between detected objects (default: '\n')
  • stream_errors ( Boolean ) put error info into the output stream (default: false)
  • max_depth ( Number ) the maximum depth to parse. -1 (the default) for "until you run out of memory". Set this to a finite positive number for un-trusted inputs. Most standard inputs won't nest more than 100 or so levels; I've tested into the millions before running out of memory.

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: