ArrayBufferViews aren't ever really arrays (I don't believe they are in normal JS either). It looks like Function.apply should still take them though - I've just filed a bug for that.
I'm sure there was a nice way to get from an ArrayBufferView to an array, but I can't remember it right now! (there's a way to go the other way)
The best I can think of right now is:
ArrayBufferView.prototype.asString = function() {
var s = "";
this.forEach(function(d) { s+=String.fromCharCode(d); });
return s;
}
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
ArrayBufferViews aren't ever really arrays (I don't believe they are in normal JS either). It looks like Function.apply should still take them though - I've just filed a bug for that.
I'm sure there was a nice way to get from an ArrayBufferView to an array, but I can't remember it right now! (there's a way to go the other way)
The best I can think of right now is: