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 Apr 23, 2024 via pnpm

pug 2.0.3

A clean, whitespace-sensitive template language for writing HTML
Package summary
Share
6
issues
5
high severity
vulnerability
2
license
1
meta
2
1
low severity
license
1
5
licenses
69
MIT
2
BSD-2-Clause
2
BSD-3-Clause
2
other licenses
ISC
1
MIT/X11
1
Package created
22 Aug 2013
Version published
21 Mar 2018
Maintainers
2
Total deps
75
Direct deps
8
License
MIT

Issues

6

5 high severity issues

high
Recommendation: Upgrade to version 3.0.1 or later
via: pug@2.0.3
Recommendation: Upgrade to version 3.0.1 or later
via: pug@2.0.3
Recommendation: Validate that the package complies with your license policy
via: pug-filters@3.1.1
via: pug-code-gen@2.0.3 & others
via: pug-code-gen@2.0.3 & others
Collapse
Expand

1 low severity issue

low
Recommendation: Read and validate the license terms
via: pug-filters@3.1.1
Collapse
Expand

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
69 Packages, Including:
@types/babel-types@7.0.15
@types/babylon@6.16.9
acorn-globals@3.1.0
acorn@3.3.0
acorn@4.0.13
align-text@0.1.4
asap@2.0.6
babel-runtime@6.26.0
babel-types@6.26.0
babylon@6.18.0
call-bind@1.0.7
camelcase@1.2.1
center-align@0.1.3
character-parser@2.2.0
clean-css@4.2.4
constantinople@3.1.2
core-js@2.6.12
decamelize@1.2.0
define-data-property@1.1.4
doctypes@1.1.0
es-define-property@1.0.0
es-errors@1.3.0
function-bind@1.1.2
get-intrinsic@1.2.4
gopd@1.0.1
has-property-descriptors@1.0.2
has-proto@1.0.3
has-symbols@1.0.3
has-tostringtag@1.0.2
hasown@2.0.2
is-buffer@1.1.6
is-core-module@2.13.1
is-expression@3.0.0
is-promise@2.2.2
is-regex@1.1.4
js-stringify@1.0.2
jstransformer@1.0.0
kind-of@3.2.2
lazy-cache@1.0.4
lodash@4.17.21
longest@1.0.1
object-assign@4.1.1
path-parse@1.0.7
promise@7.3.1
pug-attrs@2.0.4
pug-code-gen@2.0.3
pug-error@1.3.3
pug-filters@3.1.1
pug-lexer@4.1.0
pug-linker@3.0.6

BSD 2-Clause "Simplified" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
esutils@2.0.3
uglify-js@2.8.29

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
source-map@0.5.7
source-map@0.6.1

ISC License

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

MIT/X11

Invalid
Not OSI Approved
1 Packages, Including:
wordwrap@0.0.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

8
All Dependencies CSV
β“˜ This is a list of pug 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
pug-code-gen2.0.37.71 kBMIT
prod
2
pug-filters3.1.13.57 kBMIT
prod
3
1
pug-lexer4.1.011.44 kBMIT
prod
pug-linker3.0.63.14 kBMIT
prod
pug-load2.0.123.26 kBMIT
prod
pug-parser5.0.17.79 kBMIT
prod
pug-runtime2.0.56.33 kBMIT
prod
pug-strip-comments1.0.42.45 kBMIT
prod

Visualizations

Frequently Asked Questions

What does pug do?

Pug is a high-performance template engine that's predominantly utilized for writing HTML. Implemented using JavaScript for Node.js and browsers, it adopts a clean, whitespace-sensitive syntax which allows you to write HTML in a terse and simple way. The engine has a strong focus on performance and offers powerful features to facilitate website development.

How do you use pug?

To utilize Pug, you need to first install it via npm by executing the command npm install pug. After installation, you can use Pug for writing HTML markup in a simplified manner. Consider the following basic example:

doctype html
html(lang="en")
  head
    title= pageTitle
    script(type='text/javascript').
      if (foo) bar(1 + 5)
  body
    h1 Pug - Node template engine 
    #container.col
      if youAreUsingPug
        p You are amazing
      else
        p Get on it!
      p.
        Pug is a terse and simple templating language with a
        strong focus on performance and powerful features.

This Pug code will be compiled to the following HTML:

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Pug</title>
    <script type="text/javascript">
      if (foo) bar(1 + 5)
    </script>
  </head>
  <body>
    <h1>Pug - Node template engine</h1>
    <div id="container" class="col">
      <p>You are amazing</p>
      <p>Pug is a terse and simple templating language with a strong focus on performance and powerful features.</p>
    </div>
  </body>
</html>

To use the Pug API, you can invoke methods such as pug.compile, pug.render, and pug.renderFile that can take a string of Pug or a file name, along with options and locals:

var pug = require('pug');

// compile
var fn = pug.compile('string of pug', options);
var html = fn(locals);

// render
var html = pug.render('string of pug', merge(options, locals));

// renderFile
var html = pug.renderFile('filename.pug', merge(options, locals));

Where are the pug docs?

The complete documentation for Pug is available at https://pugjs.org/. This includes a reference to its API, tutorials, and additional resources that will help you get started with Pug and master its features and usage in your web development projects.