参数序列化
qs.parse()
const query = 'name=shmaur&age=18'
console.log(qs.parse(query ))
//{
//name:"shmaur",
//age:18
//}
qs.stringify()
cosnt obj = {
name:"shmaur",
age:18
}
console.log(qs.stringify(obj))
//{name=shmaur&age=18}
qs.parse()
const query = 'name=shmaur&age=18'
console.log(qs.parse(query ))
//{
//name:"shmaur",
//age:18
//}
qs.stringify()
cosnt obj = {
name:"shmaur",
age:18
}
console.log(qs.stringify(obj))
//{name=shmaur&age=18}
本文标题:qs.parse()、qs.stringify()
本文链接:https://www.haomeiwen.com/subject/uvrjcctx.html
网友评论