Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
nunjucks-in-yaml
Advanced tools
A YAML extension to use documents in YAML as Nunjucks templates.
A YAML extension to use documents in YAML as Nunjucks templates.
npm i nunjucks-in-yaml
A template files are --- # {name}
-separated YAML and nunjucks templates.
First section is YAML. Nunjucks templates follows it.
from: from@me.email
subject: Thank you for your message!
--- # text
Hi {{ user.name }},
Thank you for your message.
Best regards,
--- # html
Hi <b>{{ user.name }}<b>,
Thank you for your message.
Best regards,
const loader = require('nunjucks-in-yaml')
const user = {
name: 'Kurara',
email: 'kurara@xx.email'
}
const obj = loader.renderSync('test.yml', { user })
console.log(obj)
/* Output:
{
meta: { from: 'from@me.email', subject: 'Thank you for your message!' },
text: '\r\nHi Kurara,\r\n\r\nThank you for your message.\r\n\r\nBest regards,\r\n',
html: '\r\nHi <b>Kurara<b>,\r\n\r\nThank you for your message.\r\n\r\nBest regards,\r\n'
}
*/
FAQs
A YAML extension to use documents in YAML as Nunjucks templates.
We found that nunjucks-in-yaml 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.