
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
View Engine for ExpressJS. Write your views using ES6 Template Strings. Simple, fast, extensible.
View Engine for ExpressJS. Write your views using ES6 Template Strings. Simple, fast, extensible.
npm install --save es6views
// where ever you setup your view engine for ExpressJS
const esviews = require("es6views")
esviews.viewEngine(app)
app.set('views', path.join(__dirname, 'views'))
app.set('view engine', 'es6')
First off, create your base layout which will hold all the common logic for your views
const Layout = require("es6views").Layout
class MyLayout extends Layout {
parse() {
let markup = `<head>
<title>${this._data.title}</title>
</head>
<body>`
markup += [this.header(), this.content(), this.footer()].join("")
markup += `</body>`
this._markup = markup
}
header () {
const data = this.data
return `<header>${data.title}</header>`
}
content () {
return ``
}
footer () {
return `<footer>2008-${(new Date()).getFullYear() Dezine Zync Studios. All Rights Reserved.}</footer>`
}
}
module.exports = MyLayout
Then, inside a page template, you can do the following:
const MyLayout = require('./mylayout.es6')
class Posts extends MyLayout {
content () {
const data = this.data
const posts = data.posts
return posts.map(post => {
return `<article>${post.body}</article>`
}).join("")
}
}
module.exports = Posts
You can then use it in your route like so:
router.get('/posts', (req, res) => {
let locals = Object.assign({}, res.locals, {
posts: posts
})
res.render('projects', locals)
})
FAQs
View Engine for ExpressJS. Write your views using ES6 Template Strings. Simple, fast, extensible.
We found that es6views 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.