MCPcopy Create free account
hub / github.com/d34dman/drupal-jsonapi-params / initializeWithQueryString

Method initializeWithQueryString

src/index.ts:478–484  ·  view source on GitHub ↗

* Initialize with a previously stored query string. * * @param input The Query string to use for initializing. * @param options Options to be passed to `qs` library during parsing. * * @category Init

(input: string, options?: object)

Source from the content-addressed store, hash-verified

476 * @category Init
477 */
478 public initializeWithQueryString(input: string, options?: object) {
479 this.clear();
480 // NOTE: Empty objects are falsy in JavaScript.
481 const qsOptions = options || this.getQsOption();
482 this.initializeWithQueryObject(qs.parse(input, qsOptions));
483 return this;
484 }
485
486 /**
487 * Clone a given DrupalJsonApiParam object.

Callers 4

initializeMethod · 0.95
Qs.test.tsFile · 0.80

Calls 3

clearMethod · 0.95
getQsOptionMethod · 0.95

Tested by

no test coverage detected