Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Comprehensive lightweight query string parser and stringifier + free parsing/output of process.argv.
Comprehensive lightweight query string parser and stringifier + free parsing/output of process.argv.
Features:
import { stringify, parse, parseProcessArgs } from 'qstring'
(or qstring/dist/
for es2015)stringify(object);
-> stringparse(queryString);
-> objectparseProcessArgs(process.argv);
-> objecttoProcessArgs(object)
-> stringconst object = {
'': 'defaultParamValue',
example: [123.5, 252.23, 3, 'gaben'],
level1Name: 'name',
level1: {
title: 'level1',
'@$^strange~)*': '@:~)',
level2: {
level3Args: [1, 2, 'c'],
level3: [{
level4: 'foo'
}, , {
level4: 'bar'
}]
}
}
};
// Output below.
//for readability purposes, using a multiline
const queryString = `
?defaultParamValue
&example[0]=123.5
&example[1]=252.23
&example[2]=3
&example[3]=gaben
&level1Name=name
&level1.title=level1
&level1.%40%24%5Estrange~)*=%40%3A~)
&level1.level2.level3Args=1
&level1.level2.level3Args=2
&level1.level2.level3Args=c
&level1.level2.level3[].level4=foo
&level1.level2.level3[2].level4=bar
`.replace(/[\n\t ]/g, ''); //strip all newlines and tabs
const processArgs = `
--defaultParam
--example[0]=123.5
--example[1]=252.23
--example[2]=3
--example[3]=gaben
--level1Name=name
--level1.title=level1
--level1.@$^strange~)*=@:~)
--level1.level2.level3Args[0]=1
--level1.level2.level3Args[1]=2
--level1.level2.level3Args[2]=c --level1.level2.level3[0].level4=foo --level1.level2.level3[2].level4=bar'
Thanks, and have fun.
You can email:dev@rob.pw
, I sometimes take project requests/commissions.
FAQs
Comprehensive lightweight query string parser and stringifier + free parsing/output of process.argv.
We found that qstring demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.