Socket
Socket
Sign inDemoInstall

plain-tag

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

plain-tag

A noop/plain JS template literal tag


Version published
Maintainers
1
Created
Source

plain-tag

Build Status Coverage Status

A fast, and essential, noop/plain JS template literal tag.

import plainTag from 'plain-tag';
// const plainTag  = require('plain-tag');
// <script src="//unpkg.com/plain-tag"></script>

plainTag`one ${2} three`;
// output: "one 2 three"

It could be used to trigger CSS minification too, through rollup plugins or others.

import css from 'plain-tag';

const style = css`
  body {
    color: green;
  }
`;

Benchmark

Following the result of node test/benchmark.js after a local install of both fake-tag and noop-tag.

plain: 1.359ms
fake: 4.578ms
noop: 10.347ms

The gist of this module fits into 89 bytes before compression.

function(b){for(var c=b[0],a=1,d=arguments.length;a<d;a++)c+=arguments[a]+b[a];return c}

Keywords

FAQs

Package last updated on 04 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc