JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 191
  • Score
    100M100P100Q73145F
  • License MIT

The smallest templating engine ever.

Package Exports

  • nick

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nick) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

nick

The smallest templating engine ever.

nick is a no-nonsense string templating engine written in 11 lines.

A browser build is available at to be added. It is available globally as Nick.

Installation

$ npm i nick

Usage

var nick = require('nick');

// Create a reusable template function
var resume = nick('My name is { name }, and I am a { job } working at { company }. I have { years } years of experience in the field of { field }.');

var me = resume({
    name: 'Haskell Curry',
    job: 'logician',
    company: 'λ Combinator',
    years: 100,
    field: 'combinatory logic'
});

// My name is Haskell Curry, and I am a logician working at λ Combinator. I have 100 years of experience in the field of combinatory logic.