Class: Simple
| Defined in: | src/simple.coffee |
Overview
A CBOR Simple Value that does not map onto a known constant.
Class Method Summary
- . (Boolean) isSimple(obj) Is the given object a Simple?
- . (null, undefined, Boolean, Symbol) decode(val, has_parent = true) Decode from the CBOR additional information into a JavaScript value.
Instance Method Summary
- # (String) toString() Convert to a string
- # (String) inspect(depth, opts) Convert to a string when inspecting
Class Method Details
.
(Boolean)
isSimple(obj)
Is the given object a Simple?
.
(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.
Constructor Details
#
(void)
constructor(value)
Create a Simple with the given value
Instance Method Details
#
(String)
toString()
Convert to a string
#
(String)
inspect(depth, opts)
Convert to a string when inspecting