sky-qs
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

sky-qs

Parse and stringify URL query strings

import * as qs from "sky-qs"
var obj = qs.parse('a=c');
console.log(obj); // { a: 'c' }

Object

import * as qs from "sky-qs"
var str = qs.stringify({
	a: {
		b: 1
	}
});
console.log(str); // a[b]=1

Array

import * as qs from "sky-qs"
var str = qs.stringify({
	a: [1,2,3]
});
console.log(str); // a[0]=1&a[1]=2&a[2]=3

Empty

import * as qs from "sky-qs"
var str = qs.stringify({
	a: "",
	b: null,
	c: undefined
});
console.log(str); // a=&b

Readme

Keywords

none

Package Sidebar

Install

npm i sky-qs

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

4.86 kB

Total Files

5

Last publish

Collaborators

  • linsk