MCPcopy
hub / github.com/nbubna/store / update

Function update

test/store_test.js:60–70  ·  view source on GitHub ↗
(key, val, s)

Source from the content-addressed store, hash-verified

58 get(key, expect, s);
59 }
60 function update(key, val, s) {
61 if (typeof key === 'string' || val !== undefined) {
62 ok((s || store)(key, val) != null, "update value for '"+key+"'");
63 get(key, val, s);
64 } else {
65 equal((s || store)(key), true, 'update all values in '+key);
66 for (var k in key) {
67 get(k, key[k], s);
68 }
69 }
70 }
71 function transact(key, fn, alt, s) {
72 var ret = (s || store)(key, fn, alt);
73 strictEqual(ret, s || store, "transact should return this");

Callers 1

store_test.jsFile · 0.85

Calls 1

getFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…