Class: Simple

Defined in: src/simple.coffee

Overview

A CBOR Simple Value that does not map onto a known constant.

Class Method Summary

Instance Method Summary

Class Method Details

. (Boolean) isSimple(obj)

Is the given object a Simple?

Parameters:

  • obj ( Object ) the object to check

Returns:

  • Boolean

. (null, undefined, Boolean, Symbol) decode(val, has_parent = true)

Decode from the CBOR additional information into a JavaScript value. If the CBOR item has no parent, return a "safe" symbol instead of null or undefined, so that the value can be passed through a stream in object mode.

Parameters:

  • val ( Number ) the CBOR additional info to convert
  • has_parent ( Boolean ) Does the CBOR item have a parent?

Returns:

  • ( null, undefined, Boolean, Symbol ) — the decoded value

Constructor Details

# (void) constructor(value)

Create a Simple with the given value

Parameters:

  • value ( Integer ) the simple value's integer value

Instance Method Details

# (String) toString()

Convert to a string

Returns:

  • String

# (String) inspect(depth, opts)

Convert to a string when inspecting

Returns:

  • String

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: