File: utils.coffee
| Defined in: | src |
Variables Summary
- MAX_SAFE_HIGH =
-
0x1fffff
Method Summary
- ~ (Integer or bignum) parseCBORint(ai, buf) Parse an integer of 1,4, or 8 bytes.
- ~ (Number) parseCBORfloat(buf) Parse an IEEE754 half-, single-, or double-precision float.
- ~ (Buffer) hex(s) Decode a hex string into a buffer
- ~ (Buffer) bin(s) Decode a binary string (e.g.
- ~ (void) extend(old, adds...) Copy all of keys from the second and subsequent objects into the first object.
- ~ (Boolean) arrayEqual(a, b) Are all of the items in two arrays the same?
- ~ (void) bufferEqual(a, b) Do the two buffers contain the same bytes?
- ~ (bignumber) bufferToBignumber(buf) Convert a a buffer to a bignumber
Method Details
~
(Integer or bignum)
parseCBORint(ai, buf)
Parse an integer of 1,4, or 8 bytes.
~
(Number)
parseCBORfloat(buf)
Parse an IEEE754 half-, single-, or double-precision float.
~
(Buffer)
hex(s)
Decode a hex string into a buffer
~
(Buffer)
bin(s)
Decode a binary string (e.g. '1001') into a buffer
~
(void)
extend(old, adds...)
Copy all of keys from the second and subsequent objects into the first object.
~
(Boolean)
arrayEqual(a, b)
Are all of the items in two arrays the same?
~
(void)
bufferEqual(a, b)
Do the two buffers contain the same bytes?
~
(bignumber)
bufferToBignumber(buf)
Convert a a buffer to a bignumber