Socket
Socket
Sign inDemoInstall

edge-lexer

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edge-lexer - npm Package Compare versions

Comparing version 3.1.6 to 3.2.0

1

build/src/Tokenizer/index.d.ts

@@ -56,2 +56,3 @@ /**

filename: string;
onLine?: (line: string) => string;
});

@@ -58,0 +59,0 @@ /**

@@ -380,2 +380,8 @@ "use strict";

/**
* Pre process line when the onLine listener is defined
*/
if (typeof this.options.onLine === 'function') {
line = this.options.onLine(line);
}
/**
* There is an open block statement, so feed line to it

@@ -382,0 +388,0 @@ */

12

package.json
{
"name": "edge-lexer",
"version": "3.1.6",
"version": "3.2.0",
"description": "Parses raw markup files to converts them to Edge tokens",

@@ -36,4 +36,4 @@ "main": "build/index.js",

"@adonisjs/mrm-preset": "^2.4.0",
"@adonisjs/require-ts": "^1.0.4",
"@types/node": "^14.14.6",
"@adonisjs/require-ts": "^1.1.0",
"@types/node": "^14.14.7",
"benchmark": "^2.1.4",

@@ -45,3 +45,3 @@ "commitizen": "^4.2.2",

"doctoc": "^1.4.0",
"eslint": "^7.12.1",
"eslint": "^7.13.0",
"eslint-config-prettier": "^6.15.0",

@@ -54,5 +54,5 @@ "eslint-plugin-adonis": "^1.0.15",

"japa-cli": "^1.0.1",
"mrm": "^2.5.8",
"mrm": "^2.5.12",
"np": "^7.0.0",
"npm-audit-html": "^1.4.3",
"npm-audit-html": "^1.5.0",
"prettier": "^2.1.2",

@@ -59,0 +59,0 @@ "typedoc": "^0.19.2",

@@ -22,2 +22,3 @@ <div align="center"><img src="https://res.cloudinary.com/adonis-js/image/upload/q_100/v1600679850/edge-banner_wao6ex.png" width="600px"></div>

- [Usage](#usage)
- [Pre-processing lines](#pre-processing-lines)
- [Terms used](#terms-used)

@@ -94,2 +95,20 @@ - [Tokens](#tokens)

## Pre-processing lines
You can also pre-process lines before the tokenizer tokenizes them.
```ts
const options = {
filename: 'welcome.edge',
onLine: (line: string) => {
// transform here and return new string value
return line
},
}
const tokenizer = new Tokenizer(template, {}, options)
```
---
## Terms used

@@ -96,0 +115,0 @@

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