Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
String and JSON expression interpolator and evaluator. Interpolates or evaluates a string against a json object, or transforms an object into another based on a json template
String and JSON expression interpolator and evaluator. Interpolates or evaluates a string against a json object, or transforms an object into another based on a json template.
npm install jsexpr
const expression = require("jsexpr");
var fn = expression.fn("(${host}=='mymachine' || ${host}=='yourmachine') && ${appName}=='su'");
// Result: false
var result = fn({host:"mymachine",appName:23});
const expression = require("jsexpr");
var expr = expression.expr("/var/${date}/${client.address}/file.log");
// Result: /var/2017-01-01/localhost/file.log
var result = expr({date:"2017-01-01",client:{address:"localhost"}});
const expression = require("jsexpr");
var jsexpr = expression.expr({
time : "${client}/${address.host}:${address.port}",
data : {
request : {
headers : "${headers}"
}
}
});
var result = jsexpr({
client : "HOST001",
address : {
host : "localhost",
port : 8080
},
headers : "Content-Type: application/json"
});
{
time: 'HOST001/localhost:8080',
data: {
request: {
headers: 'Content-Type: application/json'
}
}
}
FAQs
String and JSON expression interpolator and evaluator. Interpolates or evaluates a string against a json object, or transforms an object into another based on a json template
The npm package jsexpr receives a total of 14 weekly downloads. As such, jsexpr popularity was classified as not popular.
We found that jsexpr 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.