Skip to content

lodgify/get-query-string

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A simple helper to build strings from a query

Resources

License

Stars

Watchers

Forks

Packages

No packages published