MCPcopy Create free account
hub / github.com/facebook/Rapid / mergeLocationSets

Method mergeLocationSets

modules/core/LocationSystem.js:297–303  ·  view source on GitHub ↗

* mergeLocationSets * Accepts an Array of Objects containing `locationSet` properties: * [ * { id: 'preset1', locationSet: {…} }, * { id: 'preset2', locationSet: {…} }, * … * ] * After validating, the Objects will be decorated with a `locationSetID` property: * [ * { i

(objects)

Source from the content-addressed store, hash-verified

295 * @return Promise resolved true (this function used to be slow/async, now it's faster and sync)
296 */
297 mergeLocationSets(objects) {
298 if (!Array.isArray(objects)) return Promise.reject('nothing to do');
299
300 objects.forEach(obj => this._validateLocationSet(obj));
301 this._rebuildIndex();
302 return Promise.resolve(objects);
303 }
304
305
306 /**

Callers 3

mergeMethod · 0.80
getCommunityIndexAsyncFunction · 0.80

Calls 2

_validateLocationSetMethod · 0.95
_rebuildIndexMethod · 0.95

Tested by

no test coverage detected