MCPcopy
hub / github.com/apache/pouchdb / update

Method update

lib/index.js:2730–2744  ·  view source on GitHub ↗
(id, updatedTask)

Source from the content-addressed store, hash-verified

2728 }
2729
2730 update(id, updatedTask) {
2731 const task = this.tasks[id];
2732 if (typeof task !== 'undefined') {
2733 const mergedTask = {
2734 id: task.id,
2735 name: task.name,
2736 created_at: task.created_at,
2737 total_items: updatedTask.total_items || task.total_items,
2738 completed_items: updatedTask.completed_items || task.completed_items,
2739 updated_at: new Date().toJSON()
2740 };
2741 this.tasks[id] = mergedTask;
2742 }
2743 return this.tasks;
2744 }
2745}
2746
2747PouchDB.adapters = {};

Callers 6

binaryMd5Function · 0.45
stringMd5Function · 0.45
onChangeMethod · 0.45
processBatchFunction · 0.45
finishBatchFunction · 0.45
onChangeFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected