Skip to content

Latest commit

 

History

History
executable file
·
18 lines (15 loc) · 318 Bytes

File metadata and controls

executable file
·
18 lines (15 loc) · 318 Bytes

Build query string

Turns an objest into a query param string

Import

import { buildQueryString } from '@adso-ts/build-query-string';

How to use

const obj = {
    from: 1,
    to: 2,
    user: 'test-user',
}

const queryString = buildQueryString(obj);  // result ?from=1&to=2&user=test-user