Socket
Socket
Sign inDemoInstall

@ungap/template-tag-arguments

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ungap/template-tag-arguments

Normalizes tagged arguments granting a unique template


Version published
Weekly downloads
1K
decreased by-9.39%
Maintainers
1
Weekly downloads
 
Created
Source

Template Tag Arguments

Build Status Coverage Status Greenkeeper badge WebReflection status

Normalizes tagged arguments granting a unique template through the @ungap/template-literal module.

import tta from '@ungap/template-tag-arguments';

const tag = (...args) => {
  const [template, ...interpolations] = tta(...args);
  // template is now unique in TypeScript, old Firefox, and others
  return template;
};

tag(1) === tag(2); // true as specified by ECMAScript standard

function test(value) {
  return tag`a${value}b`;
}
How to include
  • CDN as global utility via https://unpkg.com/@ungap/template-tag-arguments
  • CDN as ESM module via import tta from 'https://unpkg.com/@ungap/template-tag-arguments?module'
  • ESM via import tta from '@ungap/template-tag-arguments'
  • CJS via const tta = require('@ungap/template-tag-arguments')

Keywords

FAQs

Package last updated on 02 May 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