Gathering detailed insights and metrics for pug-lexer
Gathering detailed insights and metrics for pug-lexer
Gathering detailed insights and metrics for pug-lexer
Gathering detailed insights and metrics for pug-lexer
pug-strip-comments
Strip comments from a Pug token stream (from the lexer)
rosaenlg-pug-lexer
The pug lexer (takes a string and converts it to an array of tokens) - RosaeNLG fork
pugneum-lexer
Lexes pugneum templates and transforms them into arrays of tokens
yy-pug-lexer
The pug lexer (takes a string and converts it to an array of tokens)
npm install pug-lexer
Typescript
Module System
Node Version
NPM Version
pug@3.0.3
Updated on May 24, 2024
pug-code-gen@3.0.3
Updated on May 24, 2024
pug-error@2.1.0
Updated on May 24, 2024
pug@3.0.2
Updated on Feb 28, 2021
pug-lexer@5.0.1
Updated on Feb 28, 2021
pug-runtime@3.0.1
Updated on Feb 28, 2021
JavaScript (78.47%)
Pug (14.98%)
HTML (5.98%)
TypeScript (0.49%)
CoffeeScript (0.04%)
Stylus (0.03%)
CSS (0.01%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
21,817 Stars
2,573 Commits
1,947 Forks
539 Watchers
11 Branches
248 Contributors
Updated on Jul 10, 2025
Latest Version
5.0.1
Package Id
pug-lexer@5.0.1
Size
13.38 kB
NPM Version
6.14.11
Node Version
12.20.2
Published on
Feb 28, 2021
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
2
The pug lexer. This module is responsible for taking a string and converting it into an array of tokens.
npm install pug-lexer
1var lex = require('pug-lexer');
lex(str, options)
Convert Pug string to an array of tokens.
options
can contain the following properties:
filename
(string): The name of the Pug file; it is used in error handling if provided.plugins
(array): An array of plugins, in the order they should be applied.1console.log(JSON.stringify(lex('div(data-foo="bar")', {filename: 'my-file.pug'}), null, ' '))
1[ 2 { 3 "type": "tag", 4 "line": 1, 5 "val": "div", 6 "selfClosing": false 7 }, 8 { 9 "type": "attrs", 10 "line": 1, 11 "attrs": [ 12 { 13 "name": "data-foo", 14 "val": "\"bar\"", 15 "escaped": true 16 } 17 ] 18 }, 19 { 20 "type": "eos", 21 "line": 1 22 } 23]
new lex.Lexer(str, options)
Constructor for a Lexer class. This is not meant to be used directly unless you know what you are doing.
options
may contain the following properties:
filename
(string): The name of the Pug file; it is used in error handling if provided.interpolated
(boolean): if the Lexer is created as a child lexer for inline tag interpolation (e.g. #[p Hello]
). Defaults to false
.startingLine
(integer): the real line number of the first line in the input. It is also used for inline tag interpolation. Defaults to 1
.plugins
(array): An array of plugins, in the order they should be applied.MIT
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
Found 15/30 approved changesets -- score normalized to 5
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
license file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
35 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More