MCPcopy Index your code
hub / github.com/BlueWallet/BlueWallet / create

Function create

tests/setup.js:399–410  ·  view source on GitHub ↗
(type, data)

Source from the content-addressed store, hash-verified

397 },
398
399 create(type, data) {
400 const store = getStore(type);
401 const pkField = PK_FIELD[type];
402 const pk = pkField !== undefined ? data[pkField] : JSON.stringify(data);
403 // Shallow-copy so later mutations to the caller's object don't affect
404 // what the store holds. Attach a non-enumerable tag for delete().
405 const stored = Object.defineProperty({ ...data }, '_realmMeta', {
406 value: { type, pk },
407 enumerable: false,
408 });
409 store.set(pk, stored);
410 },
411
412 delete(target) {
413 if (!target) return;

Callers

nothing calls this directly

Calls 2

getStoreFunction · 0.85
setMethod · 0.80

Tested by

no test coverage detected