Socket
Socket
Sign inDemoInstall

edge.js

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edge.js - npm Package Compare versions

Comparing version 5.4.0 to 5.5.0

5

build/src/Contracts/index.d.ts

@@ -340,2 +340,7 @@ /**

/**
* Get access to the underlying template renderer. Each render call
* to edge results in creating an isolated renderer instance.
*/
onRender(callback: (renderer: EdgeRendererContract) => void): this;
/**
* Get a renderer instance to render templates

@@ -342,0 +347,0 @@ */

@@ -24,2 +24,6 @@ import { Loader } from '../Loader';

/**
* Array of registered renderer hooks
*/
private renderCallbacks;
/**
* Reference to the registered processor handlers

@@ -136,2 +140,7 @@ */

/**
* Get access to the underlying template renderer. Each render call
* to edge results in creating an isolated renderer instance.
*/
onRender(callback: (renderer: EdgeRendererContract) => void): this;
/**
* Returns a new instance of edge. The instance

@@ -138,0 +147,0 @@ * can be used to define locals.

16

build/src/Edge/index.js

@@ -67,2 +67,6 @@ "use strict";

/**
* Array of registered renderer hooks
*/
this.renderCallbacks = [];
/**
* Reference to the registered processor handlers

@@ -223,2 +227,10 @@ */

/**
* Get access to the underlying template renderer. Each render call
* to edge results in creating an isolated renderer instance.
*/
onRender(callback) {
this.renderCallbacks.push(callback);
return this;
}
/**
* Returns a new instance of edge. The instance

@@ -229,3 +241,5 @@ * can be used to define locals.

this.executePlugins();
return new Renderer_1.EdgeRenderer(this.compiler, this.asyncCompiler, this.GLOBALS, this.processor);
const renderer = new Renderer_1.EdgeRenderer(this.compiler, this.asyncCompiler, this.GLOBALS, this.processor);
this.renderCallbacks.forEach((callback) => callback(renderer));
return renderer;
}

@@ -232,0 +246,0 @@ /**

4

package.json
{
"name": "edge.js",
"version": "5.4.0",
"version": "5.5.0",
"description": "Template engine",

@@ -77,3 +77,3 @@ "main": "build/index.js",

"edge-lexer": "^4.0.10",
"edge-parser": "^8.2.0",
"edge-parser": "^8.2.1",
"js-stringify": "^1.0.2",

@@ -80,0 +80,0 @@ "macroable": "^7.0.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