
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
A JavaScript library useful for compiling i18n translations in a custom language to JavaScript functions.
A JavaScript library useful for compiling i18n translations written in a DSL to JavaScript functions.
With an API that is to be considered unstable.
The DSL is defined in JISON files (see src/parsers/grammars). But to illustrate the key parts of the language here is an example:
Hello $name, it has been {{formatDate($timeSinceLastVisit, "months"}} since your last visit.
This would roughly translate into the following javascript function:
function(parameters, functions) {
return 'Hello ' + parameters.name + ', it has been ' + functions['formatDate'](parameters.timeSinceLastVisit, 'months') + ' since your last visit.';
}
It is worth noting that the actual function generated includes various rules regarding escaping output, that complicates the actual function.
Sometimes we need to use a different translation string based on the input variables.
Think situations where a you need to show the number of items in a shopping basket.
If there are 0 items in the basket we might want to show something like You have no items in your basket.
.
If there is 1 item we might want to show You have one item in your basket.
, and otherwise You have $n items in your basket
.
This is supported by adding constraints to the variables, basically allowing a series of if-statements to be generated inside the function.
FAQs
A JavaScript library useful for compiling i18n translations in a custom language to JavaScript functions.
The npm package hablar receives a total of 133 weekly downloads. As such, hablar popularity was classified as not popular.
We found that hablar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 10 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.