MCPcopy Create free account
hub / github.com/bitpay/bitcore-message / fromArrayLike

Function fromArrayLike

bitcore-message.js:535–542  ·  view source on GitHub ↗
(that, array)

Source from the content-addressed store, hash-verified

533}
534
535function fromArrayLike (that, array) {
536 var length = array.length < 0 ? 0 : checked(array.length) | 0
537 that = createBuffer(that, length)
538 for (var i = 0; i < length; i += 1) {
539 that[i] = array[i] & 255
540 }
541 return that
542}
543
544function fromArrayBuffer (that, array, byteOffset, length) {
545 array.byteLength // this throws if `array` is not a valid ArrayBuffer

Callers 2

fromArrayBufferFunction · 0.85
fromObjectFunction · 0.85

Calls 2

checkedFunction · 0.85
createBufferFunction · 0.85

Tested by

no test coverage detected