tagterm

encapsulates a term in a string with html of your choosing


Keywords
term, string, html, tag, output, input, js, strong, em, sup, sub
License
WTFPL
Install
npm install tagterm@0.0.3

Documentation

tagTerm

Encapsulates a term within a string with html tags of your choosing.

Install

$ npm install tagterm

Usage

tagterm(input, term, tag)

In JS

var tagterm = require('tagterm');
input = "hello world, how are you?";
input = tagterm(input, "world", "em");

Output

hello <em>world</em>, how are you?

As HTML

hello world, how are you?