Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 8, 2024 via pnpm
Package summary
Share
0
issues
1
license
1
MIT
Package created
23 Oct 2015
Version published
16 Nov 2021
Maintainers
2
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
common-tags@1.8.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of common-tags 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does common-tags do?

Common-tags is a set of well-tested, commonly used template literal tag functions designed for use in ES2015+. This node.js module provides utility template tags for easier and cleaner manipulation of JavaScript template literals. It includes tags for actions like removing line breaks or excess white space, changing case, and even safe HTML escaping. It is especially useful when dealing with Multi-line strings or when you want to create your own template tags.

How do you use common-tags?

Using common-tags is straightforward and involves importing the tags you need from the package and using them as template tags. Here is an example of how you would use the html tag:

import { html } from 'common-tags';
let user = { name: 'John Doe' };
let output = html`
  <div id="user-card">
    <h2>${user.name}</h2>
  </div>
`;
console.log(output);

In this example, the html tag is imported from the 'common-tags' module and used as a template literal tag. This formats the resulting string by correctly indenting it.

Where are the common-tags docs?

The documentation for common-tags is located on the project's GitHub page: https://github.com/zspecza/common-tags. The detailed documentation includes usage examples, means of importing, and available tags description. The repository's README page also provides detail on advanced usage and additional ES2015 template tag modules.