0x4455414C / tagterm

Encapsulates a term in a string with html of your choosing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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?

About

Encapsulates a term in a string with html of your choosing


Languages

Language:JavaScript 100.0%