Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
param-handler
Advanced tools
this is a library that allowes you to control query params location search
-it also allows you to change it without reloading the page. useful for virtual doms like (react, svelte, angular .. etc).
-it has callback when each variable changes (you have to use the same package for it to work).
-made with typescript!.
-it can return an object with these variable instead of a boaring string, for example: "?a=5&b=dad" => {a:5,b:"dad"}
-in your command promp type:
npm install param-handler
Its easy, you will need jsdom if you don't have a dom(plain nodejs),
first of all you need to import the package:
const _PH = require("param-handler"),
{PH} = require("param-handler")
// or
import _PH, {PH} from "param-handler"
// _PH and PH are the same thing
Then
let ph = new PH(window) // pass the window from the virtual dom
Then you can start using it!
Well its easy.
You can just use
ph.set("name_of_the_variable", "the_new_value")
You have two choises:
ph.on("change", "name_of_the_variable", (new_value)=>{
console.log(`name_of_the_variable has changed to ${new_value}!`)
})
note that you can use the second argument inside the callbackfunction to call "this".
ph.get("name_of_the_variable", "default_value", "reverse_if_boolean")
console.log(`
name_of_the_variable has the value of
${ph.get("name_of_the_variable")}`)
console.log(`the fancy object ${ph.params}`)
console.log(`does name_of_the_variable exists?`)
console.log(ph.exists("name_of_the_variable")?"YES":"no :(")
FAQs
this is a library that allowes you to control query params location search
The npm package param-handler receives a total of 2 weekly downloads. As such, param-handler popularity was classified as not popular.
We found that param-handler 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
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.