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.
KsTpl is a versatile and extensible Node.js library designed for seamless template compilation in various formats, including Markdown, Twig, EJS, and more. It's a part of the robust Ksike ecosystem, ensuring reliability and compatibility with a range of applications.
This library belong to the Ksike ecosystem:
npm install kstpl
const KsTpl = require("kstpl");
const html = KsTpl.compile(
"{{name}}:{{age}}",
{ name: "Mit", age: 15 },
{ driver: "str" }
);
console.log(
html === "Mit:15"
)
const html = KsTpl.compile(
"{{name}}:{{age}}",
{ name: "Mit", age: 15 },
{ driver: "twing" }
);
console.log(
html === "Mit:15"
)
const html = KsTpl.compile(
'<%= people.join(","); %>',
{ people: ['geddy', 'neil', 'alex'] },
{ driver: "ejs" }
);
console.log(
html === "geddy,neil,alex"
)
const html = KsTpl.compile(
'# Hello, Markdown!',
null,
{ driver: "markdown" }
);
console.log(
html === "<h1>Hello, Markdown!</h1>\n"
)
KsTpl.configure({
map: { "md": "markdown", "html": "twing", "twig": "twing", "ejs": "ejs", "htmljs": "ejs" },
path: __dirname,
ext: ""
});
const ejs2html = await KsTpl.render("simple.ejs", { user: { name: "Mit", age: 15 } });
const md2html = await KsTpl.render("linked.md", {}, { page: {}, next: "Highlight" });
const twig2html = await KsTpl.render("simple.twig", {
list: [
{ name: "Mat", age: 3, twig: true },
{ name: "Deg", age: 4, twig: false },
{ name: "Ste", age: 5, twig: true }
]
});
FAQs
Ksike Template Engine
We found that kstpl demonstrated a healthy version release cadence and project activity because the last version was released less than 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.