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

Method set

modules/script/byteArray.js:49–60  ·  view source on GitHub ↗
(target, prop, val, receiver)

Source from the content-addressed store, hash-verified

47 }
48
49 static set(target, prop, val, receiver) {
50 let ix = Number.parseInt(prop);
51 if (!Number.isNaN(ix)) {
52 if (ix >= target._array.length) {
53 let newArray = new Uint8Array(ix + 1);
54 newArray.set(target._array);
55 target._array = newArray;
56 }
57 return Reflect.set(target._array, prop, val);
58 }
59 return Reflect.set(target, prop, val, receiver);
60 }
61
62 get length() {
63 return this._array.length;

Callers 15

gjs_define_console_stuffFunction · 0.80
get_program_argsFunction · 0.80
gjs_define_print_stuffFunction · 0.80
addSourceFunction · 0.80
lengthMethod · 0.80
_initFunction · 0.80
resolveModuleMethod · 0.80
moduleLoadHookMethod · 0.80
registerSchemeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected