sky-qs
v1.0.0
Published
Parse and stringify URL query strings
Downloads
2
Readme
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