BrianJVarley / tinytag

A set of useful template literal tag functions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tinytag

NPM

A set of useful template literal tag functions.

Installation

npm i --save tinytag

Usage

// Node.js
const tinyTag = require('tinytag');

// Browser
import tinyTag from 'tinytag';
// or 
import { methodName } from 'tinytag'

Methods

- highLightTag

Wraps each template variable in string literal with <span class=highlight> <span> to highlight variables in string.

Example:

highLightTag`Current account balance ${100000} no ${'overdraft'}` // => 'Current account balance <span class=highlight> 1000000 <span> no <span class=highlight> overdraft <span>'

Changelog

Changelog

License

MIT

About

A set of useful template literal tag functions

License:MIT License


Languages

Language:JavaScript 100.0%