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

ejs-plus-include

v1.0.1

Published

EJS wrapper that supports <%+ include(...) %> as an alias for <%- include(...) %>

Readme

ejs-plus-include

A small wrapper around EJS that lets you use <%+ include(...) %> as an alternative to the usual <%- include(...) %>.

This is not an official EJS feature — it's just a preprocessor that replaces <%+ with <%- before handing the template off to the original ejs engine.

Installation

npm install ejs-plus-include

Usage

Plain render

const ejsPlus = require('ejs-plus-include');

const html = ejsPlus.render('<%+ include("partials/header") %>', { title: 'Home' });

With Express

const express = require('express');
const ejsPlus = require('ejs-plus-include');

const app = express();

app.engine('ejs', ejsPlus.__express);
app.set('view engine', 'ejs');
app.set('views', './views');

Then in your .ejs files:

<%+ include('partials/header') %>
<h1><%= title %></h1>
<%+ include('partials/footer') %>

This behaves exactly like <%- include(...) %>: the included HTML is not escaped.

Why does this exist?

In vanilla EJS:

| Tag | Behavior | |---|---| | <% %> | plain JS code, no output | | <%= %> | outputs the value, HTML-escaped | | <%- %> | outputs the value unescaped (used for include, raw HTML, etc.) |

<%+ is not a standard tag. This package adds it as a convenience alias for people who find + more intuitive for "insert HTML here" than -.

API

render(template, data, options)

Same as ejs.render(), but replaces <%+ with <%- first.

renderFile(path, data, options, callback)

Renders a file from disk, using an Express-compatible callback style.

__express

Can be passed directly to Express's app.engine():

app.engine('ejs', ejsPlus.__express);

ejs

The original, unmodified ejs module, in case you need to access it directly.

Caveats

  • The substitution is a simple string replace (<%+<%-), so if a JS string literal in your template happens to contain the exact sequence <%+, it will also be replaced.
  • Since this is non-standard EJS syntax, if you work in a team, it's worth documenting (e.g. in this README) so other developers aren't confused by an undocumented tag.

License

MIT