Socket
Socket
Sign inDemoInstall

plain-tag

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    plain-tag

A noop/plain JS template literal tag


Version published
Maintainers
1
Install size
4.42 kB
Created

Readme

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

Last updated on 06 Aug 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc