Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const serialize = (obj: Record, init = '') => {
const searchParams = new URLSearchParams(init);
eachObj((v, k) => {
if (!isNil(v)) {
searchParams.set(k, v);
}
}, obj);
return searchParams.toString();
};