* @param {Uint8Array} array the Uint8Array to convert to GLib.Bytes * @returns {GLib.Bytes}
(array)
| 25 | * @returns {GLib.Bytes} |
| 26 | */ |
| 27 | function 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 | |
| 34 | var ByteArray = class ByteArray { |
| 35 | constructor(arg = 0) { |