Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

edge-parser

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edge-parser - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

build/src/EdgeBuffer/index.d.ts

@@ -37,3 +37,3 @@ /**

*/
flush(): string;
flush(wrapAsFunction?: boolean): string;
/**

@@ -40,0 +40,0 @@ * Returns the number of spaces to the added to the current line for

@@ -63,11 +63,14 @@ "use strict";

*/
flush() {
let returnValue = '(function (template, ctx) {';
returnValue += `${os_1.EOL} let out = ''`;
returnValue += `${this.lines}`;
returnValue += `${os_1.EOL} return out`;
returnValue += `${os_1.EOL}})(template, ctx)`;
/**
* Reset internal props.
*/
flush(wrapAsFunction = true) {
let returnValue = '';
if (wrapAsFunction) {
returnValue = '(function (template, ctx) {';
returnValue += `${os_1.EOL} let out = ''`;
returnValue += `${this.lines}`;
returnValue += `${os_1.EOL} return out`;
returnValue += `${os_1.EOL}})(template, ctx)`;
}
else {
returnValue = this.lines;
}
this.lines = '';

@@ -74,0 +77,0 @@ this.indentSpaces = 2;

@@ -32,3 +32,3 @@ /**

*/
parseTemplate(template: string): string;
parseTemplate(template: string, wrapAsFunction?: boolean): string;
/**

@@ -35,0 +35,0 @@ * Process a token and writes the output to the buffer instance

@@ -67,3 +67,3 @@ "use strict";

*/
parseTemplate(template) {
parseTemplate(template, wrapAsFunction = true) {
const buffer = new EdgeBuffer_1.EdgeBuffer();

@@ -75,3 +75,3 @@ const tokenizer = new edge_lexer_1.Tokenizer(template, this.tags);

});
return buffer.flush();
return buffer.flush(wrapAsFunction);
}

@@ -78,0 +78,0 @@ /**

@@ -0,1 +1,12 @@

<a name="1.0.5"></a>
## [1.0.5](https://github.com/poppinss/edge-parser/compare/v1.0.4...v1.0.5) (2018-07-02)
### Features
* **buffer:** add support to return unwrapped lines ([da27c99](https://github.com/poppinss/edge-parser/commit/da27c99))
* **parser:** add support for unwrapped templates ([853ba21](https://github.com/poppinss/edge-parser/commit/853ba21))
<a name="1.0.3"></a>

@@ -2,0 +13,0 @@ ## [1.0.3](https://github.com/poppinss/edge-parser/compare/v1.0.2...v1.0.3) (2018-07-01)

{
"name": "edge-parser",
"version": "1.0.4",
"version": "1.0.5",
"description": "Parser for edge template engine",

@@ -5,0 +5,0 @@ "scripts": {

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