New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cloudflare-esi

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudflare-esi - npm Package Compare versions

Comparing version 0.0.0-80da88e873fb9fde62ab111b2ef36a72a2bb84fa to 0.0.0-8ffcc577deb65e3f94b84251648ea032b8dd70ad

2

dist/index.d.ts

@@ -93,3 +93,3 @@ /// <reference types="@cloudflare/workers-types" />

export declare type customESIVarsFunction = (request: Request) => Promise<customESIVars>;
export declare type fetchFunction = (request: string | Request, requestInitr?: Request | RequestInit | undefined) => Promise<Response>;
export declare type fetchFunction = (request: string | Request) => Promise<Response>;
export declare class esi {

@@ -96,0 +96,0 @@ options: ESIConfig;

@@ -91,3 +91,3 @@ import { tagParser } from "./tagParser";

const reg_esi_brackets = /(?:'.*?(?<!\\)')|(\(|\))/g;
const reg_esi_condition = /(?:(\d+(?:\.\d+)?)|(?:'(.*?)(?<!\\)'))\s*(!=|={2}|=~|<=|>=|>|<)\s*(?:(\d+(?:\.\d+)?)|(?:'(.*?)(?<!\\)'))/;
const reg_esi_condition = /(?:(\d+(?:\.\d+)?)|(?:'(.*?)(?<!\\)'))\s*(!=|==|=~|<=|>=|>|<)\s*(?:(\d+(?:\.\d+)?)|(?:'(.*?)(?<!\\)'))/;
/**

@@ -254,3 +254,2 @@ * Evaluates esi Vars within when tag conditional statements

let depth = 0;
let conditionAfter = null;
const fullExpression = [];

@@ -280,4 +279,2 @@ const tokensSplit = condition.matchAll(reg_esi_brackets);

fullExpression.push(bracketResult.toString());
// Grab anything that is left
conditionAfter = condition.substring(endIndex + 1);
// Know were we are up too

@@ -288,10 +285,11 @@ parsedPoint = endIndex + 1;

}
// If we didnt have any then push it all along
// Otherwise push the leftovers and return
if (endIndex == -1) {
fullExpression.push(condition);
return await esi_seperator_splitter(condition);
}
if (conditionAfter) {
fullExpression.push(conditionAfter);
else {
fullExpression.push(condition.substring(endIndex + 1));
return await esi_seperator_splitter(fullExpression.join(""));
}
const condResult = await esi_seperator_splitter(fullExpression.join(""));
return condResult;
}

@@ -298,0 +296,0 @@ /**

{
"name": "cloudflare-esi",
"version": "0.0.0-80da88e873fb9fde62ab111b2ef36a72a2bb84fa",
"version": "0.0.0-8ffcc577deb65e3f94b84251648ea032b8dd70ad",
"repository": "cdloh/cloudflare-esi",

@@ -5,0 +5,0 @@ "description": "ESI Parser built to run in Cloudflare workers",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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