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.1 to 1.0.2

4

build/EdgeBuffer/index.d.ts

@@ -17,2 +17,6 @@ /**

/**
* Writes raw text to the output
*/
writeRaw(text: string): void;
/**
* Write a new line to the output

@@ -19,0 +23,0 @@ */

@@ -32,2 +32,9 @@ "use strict";

/**
* Writes raw text to the output
*/
writeRaw(text) {
text = text.replace(/[']/g, '\\\'');
this.lines += `\n${this.getSpace()}out += '${text}'`;
}
/**
* Write a new line to the output

@@ -56,7 +63,7 @@ */

flush() {
let returnValue = '(function (ctx) {';
let returnValue = '(function (template, ctx) {';
returnValue += `\n let out = ''`;
returnValue += `${this.lines}`;
returnValue += '\n return out';
returnValue += '\n})(ctx)';
returnValue += '\n})(template, ctx)';
/**

@@ -63,0 +70,0 @@ * Reset internal props.

4

build/Parser/index.js

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

if (token.type === 'raw') {
buffer.writeLine(`'${token.value}'`);
buffer.writeRaw(token.value);
return;

@@ -90,3 +90,3 @@ }

if (token.type === 'newline') {
buffer.writeLine(`'\\n'`);
buffer.writeRaw(`\\n`);
return;

@@ -93,0 +93,0 @@ }

@@ -0,1 +1,11 @@

<a name="1.0.2"></a>
## [1.0.2](https://github.com/poppinss/edge-parser/compare/v1.0.0...v1.0.2) (2018-06-01)
### Bug Fixes
* **buffer:** escape quotes inside raw strings ([cd659d0](https://github.com/poppinss/edge-parser/commit/cd659d0))
<a name="1.0.1"></a>

@@ -2,0 +12,0 @@ ## [1.0.1](https://github.com/poppinss/edge-parser/compare/v1.0.0...v1.0.1) (2018-06-01)

{
"name": "edge-parser",
"version": "1.0.1",
"version": "1.0.2",
"description": "Parser for edge template engine",

@@ -5,0 +5,0 @@ "main": "./build/Parser/index.js",

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