Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@modulor-js/html
Advanced tools
Missing template engine for Web Components
import { html, render } from '@modulor-js/html';
customElements.define('my-component', class extends HTMLElement {
set props({ first, second }){
render(html`
<div>first: ${first}</div>
<div>second: ${second}</div>
`, this);
}
});
const first = 'foo';
render(html`
<my-component first="${first}" second="bar"></my-conponent>
`, document.getElementById('root'));
...and much more
import { html, render } from '@modulor-js/html';
const tpl = (date) => html`
<span>Time: ${date.toLocaleTimeString()}</span>
`;
setInterval(() => {
render(tpl(new Date()), document.getElementById('root'));
}, 1000);
Can be used in production and is already battle tested
Designed to be compatible with CustomElements
Small size (4.2kb minigzipped)
High performance
Native js syntax for templates (tagged template literals)
npm install --save @modulor-js/html
IE >= 11 and all evergreens
In real life templates can (and will) be way bigger and more complex so you might want to split them out of js code
For this case there is modulor-html-loader
npm run build
: build the app
npm run test
: test the app
npm run benchmark
: runs node-based benchmarks
npm run benchmark:browser
: runs benchmarks in browser
Found a bug or issue? Please report it
FAQs
Template engine based on tagged template literals
The npm package @modulor-js/html receives a total of 8 weekly downloads. As such, @modulor-js/html popularity was classified as not popular.
We found that @modulor-js/html demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.