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

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 3.5.0 to 3.5.1

2

build/src/Contracts/index.d.ts

@@ -169,3 +169,3 @@ /**

*/
use(pluginFn: (edge: this) => void): this;
use<T extends any>(pluginFn: (edge: this, firstRun: boolean, options: T) => void, options?: T): this;
/**

@@ -172,0 +172,0 @@ * Register a custom tag

@@ -10,2 +10,3 @@ import { ClaimTagFn } from 'edge-parser';

private options;
private executedPlugins;
/**

@@ -56,3 +57,3 @@ * Options passed to the compiler instance

*/
use(pluginFn: (edge: this) => void): this;
use<T extends any>(pluginFn: (edge: this, firstRun: boolean, options: T) => void, options?: T): this;
/**

@@ -59,0 +60,0 @@ * Mount named directory to use views. Later you can reference

@@ -43,2 +43,3 @@ "use strict";

this.options = options;
this.executedPlugins = false;
/**

@@ -84,7 +85,15 @@ * Options passed to the compiler instance

executePlugins() {
if (!this.plugins.length) {
return;
if (this.executedPlugins) {
this.plugins.forEach(({ fn, options }) => {
if (options && options.recurring) {
fn(this, false, options);
}
});
}
this.plugins.forEach((pluginFn) => pluginFn(this));
this.plugins = [];
else {
this.executedPlugins = true;
this.plugins.forEach(({ fn, options }) => {
fn(this, true, options);
});
}
}

@@ -95,4 +104,7 @@ /**

*/
use(pluginFn) {
this.plugins.push(pluginFn);
use(pluginFn, options) {
this.plugins.push({
fn: pluginFn,
options,
});
return this;

@@ -99,0 +111,0 @@ }

{
"name": "edge.js",
"version": "3.5.0",
"version": "3.5.1",
"description": "Template engine",

@@ -5,0 +5,0 @@ "main": "build/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