MCPcopy
hub / github.com/OpenBMB/AgentVerse / removeKey

Method removeKey

ui/src/phaser3-rex-plugins/plugins/utils/struct/Tree.js:74–91  ·  view source on GitHub ↗
(keys)

Source from the content-addressed store, hash-verified

72 }
73
74 removeKey(keys) {
75 if (keys === undefined) {
76 this.clear();
77 } else {
78 if (typeof (keys) === 'string') {
79 keys = this.getFullPath(keys).split('.');
80 }
81
82 var lastKey = keys.pop();
83 var entry = GetEntry(this.data, keys);
84
85 if (IsObject(entry)) {
86 delete entry[lastKey];
87 }
88 }
89
90 return this;
91 }
92
93 hasKey(keys) {
94 if (typeof (keys) === 'string') {

Callers 1

clearMethod · 0.80

Calls 5

clearMethod · 0.95
getFullPathMethod · 0.95
IsObjectFunction · 0.85
GetEntryFunction · 0.70
popMethod · 0.45

Tested by

no test coverage detected