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 🙏

© 2025 – Pkg Stats / Ryan Hefner

lineup-template

v1.0.0

Published

An inline template style for dynamic config files

Downloads

16

Readme

lineup

An inline template style for dynamic config files

Why?

Sometimes you just need some simple one line configuration templates. A few scattered across the page with no need for logic or looping, just some quick and dirty text replacement. Enter lineup! It's nothing fancy, simply developed for those times when you need to provide a few text replacements from a JSON source and you don't want to unpack the object or have to write a function for a string.replace call to map an object to the string.

Installation

  • Bower: install with bower install lineup and include in a script tag on your page. The library will be accesible globally via the lineup(template, data) function.
  • Browser: download lineup.js from github, place in your project directory, and include in a script tag on your page. The library will be accesible globally via the lineup(template, data) function.
  • NPM: install with npm install lineup-template. The library can be used with var lineup = require("lineup-template");.

Example

// Example config file
PageTitle: %username%'s blog
Github-Link: https://github.com/%username%
Tagline: Do you need a contrived example for a % symbol that will function normally in a %engine.name% template? Look no further than this 100% fullproof example!

// Data source
{
  "username": "Commander-lol",
  "engine": {
    "name": "lineup",
    "version": "1.0.0"
  }
}

// Output
PageTitle: Commander-lol's blog
Github-Link https://github.com/Commander-lol
Tagline: Tagline: Do you need a contrived example for a % symbol that will function normally in a lineup template? Look no further than this 100% fullproof example!

Usage

Basic

lineup(template, data)

lineup templates only have one type of markup: the data tag. Surround any alphanumeric identifier with % symbols to turn it into a data tag. For example, This piece of text contains one %datatag% has a tag called datatag. When the template is executed, lineup will retrieve the property called datatag from the provided data object and replace it inline. Using the previous example, executing lineup(template, {datatag: "kitten"}); would return This piece of text contains one kitten.

There can be no whitespace within a data tag, as this is the method by which lineup distinguishes between normal % symbols and data tags.

Slightly More Advanced

Data tags can identify properties in a data object at an arbitrary depth by seperating identifiers with a period. With the template I really like %animal.colour% %animal.name%s, the function call lineup(template, {animal: {colour: "purple", "name: "jaguar"}}); would return I really like purple jaguars.