Socket
Socket
Sign inDemoInstall

pug-lexer

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pug-lexer - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

5

History.md

@@ -0,1 +1,6 @@

2.0.1 / 2016-05-31
==================
* Update README for `filename` option
2.0.0 / 2016-05-14

@@ -2,0 +7,0 @@ ==================

4

package.json
{
"name": "pug-lexer",
"version": "2.0.0",
"version": "2.0.1",
"description": "The pug lexer (takes a string and converts it to an array of tokens)",

@@ -28,2 +28,2 @@ "keywords": [

"license": "MIT"
}
}

@@ -19,14 +19,14 @@ # pug-lexer

### `lex(str, filename, options)`
### `lex(str, options)`
Convert Pug string to an array of tokens.
`filename`, if provided, is used in error handling.
`options` can contain the following property:
- `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")', 'my-file.pug'), null, ' '))
console.log(JSON.stringify(lex('div(data-foo="bar")', {filename: 'my-file.pug'}), null, ' '))
```

@@ -60,3 +60,3 @@

### `new lex.Lexer(str, filename, options)`
### `new lex.Lexer(str, options)`

@@ -67,2 +67,3 @@ Constructor for a Lexer class. This is not meant to be used directly unless you know what you are doing.

- `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`.

@@ -69,0 +70,0 @@ - `startingLine` (integer): the real line number of the first line in the input. It is also used for inline tag interpolation. Defaults to `1`.

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