MCPcopy Create free account
hub / github.com/DHTMLX/gantt / update

Method update

scripts/backend/storage.js:21–33  ·  view source on GitHub ↗
(id, table, newData)

Source from the content-addressed store, hash-verified

19 });
20 }
21 update(id, table, newData) {
22 return this._data[table].find(function(entry, index, arr) {
23 if (id == entry.id) {
24 var preparedItem = newData;
25 console.log(table)
26 if(this._initItem && this._initItem[table]){
27 preparedItem = this._initItem[table](preparedItem);
28 }
29 arr[index] = _addId(id, sanitizeObject(preparedItem));
30 return true;
31 }
32 }.bind(this));
33 }
34 insert(table, data) {
35 data.id = uid();
36 var preparedItem = data;

Callers

nothing calls this directly

Calls 3

_addIdFunction · 0.85
sanitizeObjectFunction · 0.85
bindMethod · 0.80

Tested by

no test coverage detected