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

Method setParam

modules/core/UrlHashSystem.js:210–222  ·  view source on GitHub ↗

* setParam * Sets a `key=value` pair that will be added to the hash params. * Values passed as `undefined` or `null` will be deleted from the query params * Values passed as empty string '' will remain in the query params * @param k {String} The key to set * @param v {String} The

(k, v)

Source from the content-addressed store, hash-verified

208 * @param v {String} The value to set, pass `undefined` to delete the value
209 */
210 setParam(k, v) {
211 if (typeof k !== 'string') return;
212
213 if (v === undefined || v === null || v === 'undefined' || v === 'null') {
214 this._currParams.delete(k);
215 } else {
216 this._currParams.set(k, v);
217 }
218
219 if (this._started && !this._paused) {
220 this.deferredUpdateHash();
221 }
222 }
223
224
225 /**

Callers 11

visibleMethod · 0.45
_imageryChangedMethod · 0.45
_updateHashMethod · 0.45
_photoChangedMethod · 0.45
_updateMethod · 0.45
_datasetsChangedMethod · 0.45
_hashchangeMethod · 0.45
_mapRouletteChangedMethod · 0.45
_updateHashMethod · 0.45
enterMethod · 0.45
exitMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected