Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

qs-native

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qs-native

Lightweight querystring parse() & stringify() based on URLSearchParams APIs

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

qs-native

Lightweight querystring parse & stringify based on URLSearchParams API

npm install qs-native

npm Coverage Status CodeQL NodeJS Tests CI Test Coveralls

Using

import qs from 'qs-native';

qs.parse("?a=b&c=d");
//=> { a: "b", c: "d" }

qs.stringify({ a: "b", c: "d" });
//=> "a=b&c=d"

Parsing options

strictNullHandling: boolean - optional

qs.parse("?a=b&c");
//=> { a: "b", c: null }

Stringify options

skipNulls: boolean - optional

qs.stringify({ a: "b", c: null }, { skipNulls: true });
//=> "a=b"

addQueryPrefix: boolean - optional

qs.stringify({ a: "b", c: "d" }, { addQueryPrefix: true });
//=> "?a=b"

Using in IE11 and older

For using qs-native in IE11 and other browsers that doesn't support URLSearchParams API install core-js polyfill https://github.com/zloirock/core-js#url-and-urlsearchparams

CoreJS - CommonJS entry points:

core-js/proposals/url
core-js(-pure)/web/url
core-js(-pure)/web/url-search-params
core-js(-pure)/stable|features/url
core-js/stable|features/url/to-json
core-js(-pure)/stable|features/url-search-params

Keywords

FAQs

Package last updated on 13 Aug 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc