rx-query
Version:
14 lines • 382 B
JavaScript
/**
* Creates a query key based on the key and the params
*/
export function createQueryKey(key, params) {
if (params !== undefined && params !== null) {
return (key +
'-' +
(['string', 'number'].includes(typeof params)
? params
: JSON.stringify(params)));
}
return key;
}
//# sourceMappingURL=key.js.map