Linux v69820.1blu.de 4.15.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
Apache/2.4.58
Server IP : 195.90.215.149 & Your IP : 216.73.216.250
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
coviddata /
node_modules /
pug-lexer /
Delete
Unzip
Name
Size
Permission
Date
Action
History.md
1.5
KB
-rw-r--r--
1985-10-26 08:15
LICENSE
1.03
KB
-rw-r--r--
1985-10-26 08:15
README.md
2.18
KB
-rw-r--r--
1985-10-26 08:15
index.js
43.43
KB
-rw-r--r--
1985-10-26 08:15
package.json
1.27
KB
-rw-r--r--
2021-01-22 18:49
Save
Rename
# pug-lexer The pug lexer. This module is responsible for taking a string and converting it into an array of tokens. [](https://travis-ci.org/pugjs/pug-lexer) [](https://david-dm.org/pugjs/pug?path=packages/pug-lexer) [](https://david-dm.org/pugjs/pug?path=packages/pug-lexer&type=dev) [](https://www.npmjs.org/package/pug-lexer) [](https://codecov.io/gh/pugjs/pug-lexer) ## Installation npm install pug-lexer ## Usage ```js var 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. ```js console.log(JSON.stringify(lex('div(data-foo="bar")', {filename: 'my-file.pug'}), null, ' ')) ``` ```json [ { "type": "tag", "line": 1, "val": "div", "selfClosing": false }, { "type": "attrs", "line": 1, "attrs": [ { "name": "data-foo", "val": "\"bar\"", "escaped": true } ] }, { "type": "eos", "line": 1 } ] ``` ### `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. ## License MIT