Skip to content

Teamweek/substring-template-language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Substring Template Language

A tiny template language for escaping substrings of longer strings.

Yet another template language?

There are no variables in the Substring template language. It is a tiny utility for escaping and trimming substrings.

Installation

npm i substring-template-language --save

Usage

var subTemplate = require('substring-template-language');

// Escaping
subTemplate('Lorem <br> ipsum dolor {{<br>}} sit amet'); // 'Lorem <br> ipsum dolor &lt;br&gt; sit amet'

// Escaping and trimming
subTemplate('Lorem <br> ipsum dolor {{!  <br>  }} sit amet'); // 'Lorem <br> ipsum dolor &lt;br&gt; sit amet'

About

A tiny template language for escaping substrings of longer strings

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published