@lodgify/get-query-string

1.1.3 • Public • Published

Get an http query string from a parameters object

A simple helper to get a query string from an object.

Install

$ npm install @lodgify/get-query-string

Usage

import { getQueryString } from '@lodgify/get-query-string';

const parameters = {
      test: 1,
      hello: 'hello',
      dontIncludeEmptyStrings: '',
      dontIncludeUndefined: undefined,
      include0: 0,
      includeFalse: false,
    }

getQueryString(parameters);

Output

?test=1&hello=hello&include0=0&includeFalse=false

Contributing

See contributing.

Dependencies (0)

    Dev Dependencies (23)

    Package Sidebar

    Install

    npm i @lodgify/get-query-string

    Weekly Downloads

    35

    Version

    1.1.3

    License

    MIT

    Unpacked Size

    6.14 kB

    Total Files

    6

    Last publish

    Collaborators

    • lodgify-ci