
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
tpl_apply with handlebars
npm install --save tpl_apply
npm test
方式1 :basic
var tpl = require('./index');
var source = process.cwd() + '/tpl.js'
var dest = process.cwd() + '/test/tpl.generate.js'
tpl.tpl_apply(source, {
title: "My New Post", body: "This is my first post!"
}, dest);
方式2 :with helpers
source = process.cwd() + '/tpl2.js'
dest = process.cwd() + '/test/tpl2.generate.js'
var Handlebars = require('handlebars');
Handlebars.registerHelper('list', function(items, options) {
var out = "<ul>";
for(var i=0, l=items.length; i<l; i++) {
out = out + "<li>" + options.fn(items[i]) + "</li>";
}
return out + "</ul>";
});
tpl.tpl_apply_with_register_helper(Handlebars, source, {
people: [
{firstName: "Yehuda", lastName: "Katz"},
{firstName: "Carl", lastName: "Lerche"},
{firstName: "Alan", lastName: "Johnson"}
]
}, dest);
FAQs
tpl_apply with handlebars
The npm package tpl_apply receives a total of 35 weekly downloads. As such, tpl_apply popularity was classified as not popular.
We found that tpl_apply 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
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.