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.
@domchristie/composite
Advanced tools
A hybrid client-side/server-side approach to generating dynamic HTML.
Compose your HTML in <template>
elements. Use placeholders (${…}
) to mark dynamic content. Call fill
to generate a new HTML string which interpolates the template's content with the given properties.
npm install @domchristie/composite
/* rendered somewhere in the DOM */
<template id="hello">
<h1>${greeting}, ${name}!</h1>
</template>
import { fill } from '@domchristie/composite'
const Hello = document.getElementById('hello')
fill(Hello, { greeting: 'Hello', name: 'World' }) // '<h1>Hello, World!</h1>'
raw
Template placeholders are automatically HTML-escaped to prevent cross-site scripting (XSS) attacks. To output content without escaping, use raw
:
<template id="hello">
<h1>${raw(greeting)}, ${name}!</h1>
</template>
Copyright © 2024+ Dom Christie and released under the MIT license.
FAQs
A hybrid client-side/server-side approach to generating dynamic HTML.
The npm package @domchristie/composite receives a total of 0 weekly downloads. As such, @domchristie/composite popularity was classified as not popular.
We found that @domchristie/composite 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.
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.