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

assemble-midden

v0.4.1

Published

Assemble Helper to create pretty/interactive data dumps using midden.

Readme

Formally know as handlebars-midden

assemble-midden

Assemble Helper to create pretty/interactive data dumps using midden.

See the midden docs for a further explanation.

Install

npm install assemble-midden --save

Using with Assemble.js

Require assemble-midden into your assemblefile.js and register it as a helper.

var assemble = require('assemble');
var midden = require('assemble-midden');

var app = assemble();

// register midden as a helper
app.helper('midden', midden(true));

Midden has one config variable: isActive. This allows you to deactivate it when generating pages for a production environment. When inactive, it just returns an empty string. It might be used like so...

/* assuming var environment was set earlier */
app.helper('midden', midden(environment==='development'));

For midden to work, you also need to include it's styles and client-side code. You can find those in node_modules/midden/dist/[styles, js].

Here's how you might add them to your css and script tasks.

Stylesheets

There are three stylesheets available: midden.scss, midden.css and midden.min.css. Here's how you might add midden.scss to a SASS task.

/* using sass and autoprefixer gulp plugins */
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');

/* create an array of paths to outside stylesheets */
var styleIncludes = [
  'node_modules/midden/dist/styles/'
];
app.task('css', function () {
  return app.src('src/scss/app.scss')
    .pipe(sass({includePaths: styleIncludes})
    .pipe(autoprefixer())
    .pipe(app.dest('build/css'));
});

Then in your app.scss file...

/* Need to include extension so that SASS doesn't include the wrong file */
@import "midden.scss";

Client-Side JavaScript

If you're using browserify to process your Javascript, just require it in your main JS file.

require('midden/dist/js/midden-client.js');

On page load, it will look for midden elements to attach event handlers to.

Within your Handlebars Files

Wherever you need to inspect a context value just pass it to the helper.

{{midden "view.data"}}

Load that page from your destination directory and you should see something like this... Midden Output

Tips for Use

  • When passed large objects, midden can generate large amounts of HTML. If you're interested in just a small part of that object then specify it in your call to midden.
  • The midden client-side code uses methods not supported by IE versions 9 and earlier (which shouldn't be a problem in a development only environment). Just in case you're using an older IE you might have to install a shim like classList.

Customizing Styles

The dist/styles/midden.scss file uses over-writable default values for colors, etc. See the file for a list of values.

Release History

v0.1.0

Beta release

v0.4.1

Fixed issue caused by newer Versions of Assemble.js storing some template properties as buffer.

Contributing and Issues

Feel free to submit issues or pull requests for assemble-midden or midden. Questions on use can also be submitted to the issue queue.

There's a suite of unit tests. mocha test/*-spec.js

Midden also has a gulp file for generating client-side assets and integration testing. gulp default will spin up a server on port 8000. There, you can demo midden.

License

© 2016 John O'Donnell (Critical Mash Inc.) Released under the MIT license.