0.0.3 • Published 8 years ago

tagterm v0.0.3

Weekly downloads
6
License
WTFPL
Repository
github
Last release
8 years ago

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?