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.
mustache-formats
Advanced tools
[![npm package][npm-badge]][npm]
Add some useful formatters to Mustache using Mustache-Wax.
npm install mustache-formats
or
yarn add mustache-formats
Then to use it simply import it and call render, for example
const renderer = require('mustache-formats');
const result = renderer.render('Date: {{signature_date | date : "DD MMMM YYYY"}}', {
signature_date: '2019-06-24T16:58:34'
});
// Expect result to be "Date: 24 June 2019"
In this first version, we've defined the following formats:
Take a date (for example in ISO8601) and format it using Moment)
Usage:
{{projectInstallationDate | date : "DD MMMM YYYY" }}
Convert to a number and ensure there are two decimal places
Usage:
{{total | money}}
Add any number of variables (or numbers) to an initial one. It ignores any that are null or undefined
Usage:
{{value_1 | sum : value_2 : value_3 : value_4}}
FAQs
Adds formatters to Mustache using Wax
The npm package mustache-formats receives a total of 19 weekly downloads. As such, mustache-formats popularity was classified as not popular.
We found that mustache-formats 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.