Class: Tagged

Defined in: src/tagged.coffee

Overview

A CBOR tagged item, where the tag does not have semantics specified at the moment, or those semantics threw an error during parsing. Typically this will be an extension point you're not yet expecting.

Instance Method Summary

Constructor Details

# (void) constructor(tag, value, err)

Create a tagged value

Parameters:

  • tag ( Integer ) the number of the tag
  • value ( any ) the value inside the tag
  • err ( Error ) the error that was thrown parsing the tag

Instance Method Details

# (String) toString()

Convert to a String

Returns:

  • String

# (Any) convert(converters)

If we have a converter for this type, do the conversion. Some converters are built-in. Additional ones can be passed in. If you want to remove a built-in converter, pass a converter in whose value is 'null' instead of a function.

Parameters:

  • converters ( Object ) keys in the object are a tag number, the value is a function that takes the decoded CBOR and returns a JavaScript value of the appropriate type. Throw an exception in the function on errors.

Returns:

  • ( Any ) — the converted item

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: