Skip to content

A noop template literal tag, useful for syntax highlighting hints.

License

Notifications You must be signed in to change notification settings

fabiospampinato/noop-tag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Noop Tag

A noop template literal tag, useful for syntax highlighting hints.

This package is basically a clone of fake-tag, but about 2~4x faster, it is still 5~10x slower than untagged template literals though, so you might want to use comment tags instead.

Install

npm install --save noop-tag

Usage

import css from 'noop-tag';
import javascript from 'noop-tag';
import html from 'noop-tag';

const x = css`
  .foo {
    color: red;
  }
`;

const y = javascript`
  function () {
    return 123;
  }
`;

const z = html`
  <div>
    <b>Bold</b>
  </div>
`;

License

MIT © Fabio Spampinato