MCPcopy
hub / github.com/sunnylqm/react-native-storage / load

Method load

storage.js:303–315  ·  view source on GitHub ↗
(params)

Source from the content-addressed store, hash-verified

301 }
302 }
303 load(params) {
304 let { key, id, autoSync = true, syncInBackground = true, syncParams, batched = false } = params;
305 return this._mapPromise.then(() => new Promise((resolve, reject) => {
306 if(id === undefined) {
307 return resolve(this._lookupGlobalItem({
308 key, resolve, reject, autoSync, syncInBackground, syncParams
309 }));
310 }
311 return resolve(this._lookUpInMap({
312 key, id, resolve, reject, autoSync, syncInBackground, syncParams, batched
313 }));
314 }));
315 }
316 clearMap() {
317 this.removeItem('map').then(() => {
318 this._m = this._initMap();

Callers 5

getBatchDataMethod · 0.95
getBatchDataWithIdsMethod · 0.95
taskFunction · 0.80

Calls 2

_lookupGlobalItemMethod · 0.95
_lookUpInMapMethod · 0.95

Tested by 1

taskFunction · 0.64