npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ozura/email-renderer

v1.0.0

Published

Shared email rendering core for Ozura. Pure function: template data in, rendered HTML/text out.

Readme

@ozura/email-renderer

Shared email rendering core for Ozura. A pure function: template data in, rendered HTML/text out. No file I/O beyond the bundled Nunjucks templates and no runtime dependency on any data store or config — globals are passed in by the caller.

Install

npm install @ozura/email-renderer

Scoped to the private @ozura org on npm — you must be a member and authenticated (npm login) to install.

Usage

const { render, renderObject, BLOCK_DEFS } = require("@ozura/email-renderer");

const globals = {
  companyAddress: "Ozura, 1441 Brickell Avenue, 1400, Miami, FL 33131 US",
  logoUrl: "https://.../ozulogo.png",
};

const out = render(
  {
    subject: "Welcome, {{ name }}",
    blocks: [
      { type: "heading", text: "Welcome, {{ name }}" },
      { type: "text", html: "Your account is ready." },
      { type: "button", label: "Open dashboard", href: "https://app.ozura.com" },
    ],
    vars: { name: "Alex" },
  },
  globals,
  "dark" // "dark" (default) | "light"
);

// out => { subject, format: "html", html, text }

renderObject is an alias for render with an identical signature — named separately so CMS/editor call sites read distinctly from service call sites.

Browser-safe block metadata

BLOCK_DEFS (block type display names + editable fields) is also exported from a Node-free subpath for client-side editor UIs:

import { BLOCK_DEFS } from "@ozura/email-renderer/block-defs";

API

render(input, globals, theme?) → RenderOutput

| Param | Type | Notes | |-------|------|-------| | input | EmailInput | { subject?, format?, blocks?, text?, vars?, align?, preheader? } | | globals | Globals | { companyAddress, logoUrl } | | theme | "dark" \| "light" | Defaults to "dark" |

Returns { subject, format, html?, text? }. For format: "text", only subject and text are produced.

Blocks must be plain objects. ORM documents (e.g. Mongoose subdocuments) are normalized via a duck-typed toObject() before rendering, so passing Mongoose blocks works — but any other document wrapper should be converted to a POJO first.

Variable interpolation is logic-less by design. Only {{ name }} / {{ a.b }} placeholders in field strings are substituted (HTML-escaped); filters, function calls, and {% %} tags are left as literal text and never executed, preventing server-side template injection.

Supported block types

heading, text, muted, button, cred, divider, sectionTitle, note, stat, statPair. See BLOCK_DEFS for each type's editable fields.

Development

npm test   # parity test vs. the ozura-email-gallery reference templates

Note: the parity test reads reference templates from a sibling ozura-email-gallery checkout and is a local dev harness, not a standalone CI gate.

License

UNLICENSED — internal Ozura use only.