Skip to content

derhuerst/query-string-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

query-string-cli

Decode & encode URL query strings in the command line.

npm version build status ISC-licensed minimum Node.js version chat with me on Gitter support me via GitHub Sponsors

Installing

npm install -g query-string-cli

Usage

Usage:
    decode-query-string [--json] <encoded-query-string>
Options:
    --json       -j  Print JSON instead of an eve-friendly version.
    --delimiter  -d  Character between key/value pairs. Default: &
    --no-dots        Don't parse `a.b=foo` dot notation.
    --no-comma       Don't parse `a=foo,bar` array notation.
    --no-arrays      Don't parse `a[1]=foo` array notation.
Examples:
    decode-query-string 'foo[bar]=A&baz[0]=B&baz[1]=C'
Usage:
    encode-query-string [--no-encoding] <json>
Options:
    --no-encoding   -n  Don't URL-encode the result.
    --delimiter         Character between key/value pairs. Default: &
    --dot-notation  -d  Use the "a.b" notation for objects.
    --array-format      How to encode arrays. Default: indices
                          indices, brackets, repeat, comma
Examples:
    encode-query-string -nd '{"foo": {"bar": "A"}, "baz": ["B", "C"]}'

Pro tip: Use query-string-cli in conjunction with parse-url-cli.

Contributing

If you have a question or have difficulties using query-string-cli, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.

About

Decode & encode URL query strings in the command line.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Packages

No packages published

Contributors 2

  •  
  •