🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

webdickfacecat-qs1

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webdickfacecat-qs1

``` // 以前:JSON内置对象 // JSON.parse() JSON格式 转 对象 // JSON.stringify() 对象 转 JSON格式 // JSON数据格式三大特性:1-长的像对象,2-字符串类型,3-必须双引号 // JSON数据格式: '{"a": 1, "b": 2}'

latest
npmnpm
Version
1.0.0
Version published
Weekly downloads
3
200%
Maintainers
1
Weekly downloads
 
Created
Source

下载

// 以前:JSON内置对象
// JSON.parse() JSON格式 转 对象
// JSON.stringify() 对象 转 JSON格式
// JSON数据格式三大特性:1-长的像对象,2-字符串类型,3-必须双引号
// JSON数据格式: '{"a": 1, "b": 2}'

// 现在:QS模块
// qs.parse() get传递参数格式 转 对象
// qs.stringify() 对象 转 get传递参数格式
// get传递参数格式:  '参数名=值&...&参数名=值'


使用

const qs = require("qs");

console.log(qs.parse("a=1&b=2")); // { a: '1', b: '2' }
console.log(qs.stringify({ a: "1", b: "2" })); // a=1&b=2

FAQs

Package last updated on 14 Jun 2022

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