MCPcopy Create free account
hub / github.com/GNOME/gjs / toGBytes

Function toGBytes

modules/script/byteArray.js:27–32  ·  view source on GitHub ↗

* @param {Uint8Array} array the Uint8Array to convert to GLib.Bytes * @returns {GLib.Bytes}

(array)

Source from the content-addressed store, hash-verified

25 * @returns {GLib.Bytes}
26 */
27function toGBytes(array) {
28 if (!(array instanceof Uint8Array))
29 throw new Error('Argument to ByteArray.toGBytes() must be a Uint8Array');
30
31 return new GLib.Bytes(array);
32}
33
34var ByteArray = class ByteArray {
35 constructor(arg = 0) {

Callers 1

toGBytesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected