mappersmith
Version:
It is a lightweight rest client for node.js and the browser
20 lines (19 loc) • 719 B
TypeScript
export function toSortedQueryString(entry: any): any;
/**
* Verify if the object `A` is contained within object `B` - shallowly.
* In other words, is A a subset of B?
*
* @see https://en.wikipedia.org/wiki/Subset
*
* @param {Object} A - The object to test
* @param {Object} B - The superset object to verify against
* @returns A boolean representing if A is a shallow subset of B
*/
export function isSubset(A: Object, B: Object): boolean;
/**
* Sort the query params on a URL based on the 'key=value' string value.
* E.g. /example?b=2&a=1 will become /example?a=1&b=2
*
* @param {String} url - a URL that should be sorted (with or without query params)
*/
export function sortedUrl(url: string): string;