
Product
Announcing Bun and vlt Support in Socket
Bringing supply chain security to the next generation of JavaScript package managers
@qfed/hoegaarden
Advanced tools
$ npm install @qfed/hoegaarden
const hoegaarden = require('@qfed/hoegaarden');
console.log('parse:',hoegaarden.parse('http://www.qfed.com?name=aaa&name=bbb&age=25'))
console.log('param:',hoegaarden.param('http://www.qfed.com?name=aaa&name=bbb&age=25','name'))
console.log('stringify:',hoegaarden.stringify({name: ['aaa', 'bbb'], age: 25}))
console.log('parseUrl',hoegaarden.parseUrl('http://www.qfed.com?name=aaa&name=bbb&age=25'))
console.log('extract',hoegaarden.extract('http://www.qfed.com?name=aaa&name=bbb&age=25'))
以对象字面量形式返回 url 中的 query 解析结果
const hoegaarden = require('@qfed/hoegaarden');
hoegaarden.parse('http://www.qfed.com?name=aaa&name=bbb&age=25')
//=> {name: ['aaa', 'bbb'], age: 25}
复用parse,传入 url 与 key 返回其对应的 value
const hoegaarden = require('@qfed/hoegaarden');
hoegaarden.param('http://www.qfed.com?name=aaa&name=bbb&age=25','name')
//=> ['aaa', 'bbb']
hoegaarden.param('http://www.qfed.com?name=aaa&name=bbb&age=25','age')
//=> '25'
将一个对象转化为 url 中携带的参数格式的 string
const hoegaarden = require('@qfed/hoegaarden');
hoegaarden.stringify({name: ['aaa', 'bbb'], age: 25})
//=> 'age=25&name=aaa&name=bbb'
复用parse,将 url 中地址与参数分开
const hoegaarden = require('@qfed/hoegaarden');
hoegaarden.parseUrl('http://www.qfed.com?name=aaa&name=bbb&age=25');
//=> {url: 'http://www.qfed.com', query: {name: ['aaa', 'bbb'], age: 25}}
截取 url 携带的参数
const hoegaarden = require('@qfed/hoegaarden');
hoegaarden.extract('http://www.qfed.com?name=aaa&name=bbb&age=25')
//=> 'name=aaa&name=bbb&age=25'
FAQs
Parse, param, stringify, parseUrl and parseUrl with url
We found that @qfed/hoegaarden demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

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.

Product
Bringing supply chain security to the next generation of JavaScript package managers

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies

Product
Reachability analysis for Ruby is now in beta, helping teams identify which vulnerabilities are truly exploitable in their applications.