You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

mini-querystring

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mini-querystring

Lightweight isomorphic querystring parser.

2.0.6
latest
Source
npmnpm
Version published
Weekly downloads
173
-35.45%
Maintainers
1
Weekly downloads
 
Created
Source


Mini-QueryString
API Stability TypeScript Styled with prettier Build status Test Coverage NPM Version Downloads Browser Bundle Size

Light weight, universal, query string parser for node and the browser with support for nested properties.

Checkout q-set and q-flat (used internally) for more info on nested query string parsing and stringifying.

Installation

npm install mini-querystring

Example

import { parse, stringify } from 'mini-querystring'

// Parse standard query string.
parse('a=1&b=2&') /* { a: '1', b: '2' } */

// Parse nested query string.
parse('a=1&b[c]=2', true) /* { a: '1', b: { c: '1' } } */

// Stringify standard object.
stringify({ a: 1 }) /* 'a=1' */

// Stringify nested object.
stringify({ a: { b: 1 } }, true) /* 'a[b]=1'

Contributions

  • Use npm test to build and run tests.

Please feel free to create a PR!

Keywords

URL

FAQs

Package last updated on 16 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts