Socket
Socket
Sign inDemoInstall

edge.js

Package Overview
Dependencies
10
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.5 to 3.1.0

20

build/index.js

@@ -9,10 +9,22 @@ "use strict";

* file that was distributed with this source code.
*/
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GLOBALS = exports.safeValue = exports.Edge = void 0;
__exportStar(require("./src/Contracts"), exports);
const Edge_1 = require("./src/Edge");
exports.Edge = Edge_1.Edge;
Object.defineProperty(exports, "Edge", { enumerable: true, get: function () { return Edge_1.Edge; } });
const Context_1 = require("./src/Context");
exports.safeValue = Context_1.safeValue;
Object.defineProperty(exports, "safeValue", { enumerable: true, get: function () { return Context_1.safeValue; } });
const globals_1 = require("./src/Edge/globals");
exports.GLOBALS = globals_1.GLOBALS;
Object.defineProperty(exports, "GLOBALS", { enumerable: true, get: function () { return globals_1.GLOBALS; } });
/**

@@ -19,0 +31,0 @@ * Default export

3

build/src/CacheManager/index.js

@@ -9,4 +9,5 @@ "use strict";

* file that was distributed with this source code.
*/
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.CacheManager = void 0;
/**

@@ -13,0 +14,0 @@ * In memory cache manager to cache pre-compiled templates.

"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.Compiler = void 0;
const edge_error_1 = require("edge-error");

@@ -39,4 +40,3 @@ const edge_parser_1 = require("edge-parser");

const extendedSetCalls = [];
extended
.forEach((node) => {
extended.forEach((node) => {
/**

@@ -46,6 +46,6 @@ * Ignore new lines, comments, layout tag and empty raw nodes inside the parent

*/
if (edge_lexer_1.utils.isTag(node, 'layout')
|| node.type === 'newline'
|| (node.type === 'raw' && !node.value.trim())
|| node.type === 'comment') {
if (edge_lexer_1.utils.isTag(node, 'layout') ||
node.type === 'newline' ||
(node.type === 'raw' && !node.value.trim()) ||
node.type === 'comment') {
return;

@@ -76,4 +76,3 @@ }

*/
const finalNodes = base
.map((node) => {
const finalNodes = base.map((node) => {
if (!edge_lexer_1.utils.isTag(node, 'section')) {

@@ -90,5 +89,12 @@ return node;

*/
if (extendedNode.children.length && edge_lexer_1.utils.isTag(extendedNode.children[0], 'super')) {
extendedNode.children.shift();
extendedNode.children = node.children.concat(extendedNode.children);
if (extendedNode.children.length) {
if (edge_lexer_1.utils.isTag(extendedNode.children[0], 'super')) {
extendedNode.children.shift();
extendedNode.children = node.children.concat(extendedNode.children);
}
else if (edge_lexer_1.utils.isTag(extendedNode.children[1], 'super')) {
extendedNode.children.shift();
extendedNode.children.shift();
extendedNode.children = node.children.concat(extendedNode.children);
}
}

@@ -95,0 +101,0 @@ return extendedNode;

"use strict";
/*
* edge.js
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge.js
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -14,2 +14,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
exports.safeValue = exports.Context = exports.SafeValue = void 0;
const he_1 = __importDefault(require("he"));

@@ -45,5 +46,7 @@ const macroable_1 = require("macroable");

escape(input) {
return typeof (input) === 'string'
return typeof input === 'string'
? he_1.default.escape(input)
: (input instanceof SafeValue ? input.value : input);
: input instanceof SafeValue
? input.value
: input;
}

@@ -50,0 +53,0 @@ /**

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

* file that was distributed with this source code.
*/
*/
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -15,2 +15,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
exports.GLOBALS = void 0;
const truncatise_1 = __importDefault(require("truncatise"));

@@ -17,0 +18,0 @@ const inspect_1 = __importDefault(require("@poppinss/inspect"));

"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Edge = void 0;
const Tags = __importStar(require("../Tags"));

@@ -108,3 +121,3 @@ const Loader_1 = require("../Loader");

registerTag(tag) {
if (typeof (tag.run) === 'function') {
if (typeof tag.run === 'function') {
tag.run(Context_1.Context);

@@ -111,0 +124,0 @@ }

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.Loader = void 0;
const fs_1 = require("fs");

@@ -211,3 +212,3 @@ const path_1 = require("path");

*/
if (typeof (contents.template) !== 'string') {
if (typeof contents.template !== 'string') {
throw new Error('Make sure to define the template content as a string');

@@ -214,0 +215,0 @@ }

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

* file that was distributed with this source code.
*/
*/
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -15,2 +15,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
exports.EdgeRenderer = void 0;
const lodash_merge_1 = __importDefault(require("lodash.merge"));

@@ -17,0 +18,0 @@ const Template_1 = require("../Template");

@@ -9,4 +9,5 @@ "use strict";

* file that was distributed with this source code.
*/
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.StringifiedObject = void 0;
/**

@@ -13,0 +14,0 @@ * This class generates a valid object as a string, which is written to the template

"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.componentTag = void 0;
const edge_error_1 = require("edge-error");

@@ -73,3 +74,4 @@ const edge_lexer_1 = require("edge-lexer");

*/
const parsed = parser.utils.generateAST(token.properties.jsArg, token.loc, token.filename).expression;
const parsed = parser.utils.generateAST(token.properties.jsArg, token.loc, token.filename)
.expression;
utils_1.isSubsetOf(parsed, [edge_parser_1.expressions.Literal, edge_parser_1.expressions.SequenceExpression], () => {

@@ -167,3 +169,3 @@ utils_1.unallowedExpression(`"${token.properties.jsArg}" is not a valid argument type for the @slot tag`, token.filename, parser.utils.getExpressionLoc(parsed));

/**
* Ignore first newline inside slots
* Ignore first newline inside the unnamed main slot
*/

@@ -208,5 +210,2 @@ if (mainSlot.buffer.size === 0 && child.type === 'newline') {

child.children.forEach((grandChildren) => {
if (slots[slotName].buffer.size === 0 && grandChildren.type === 'newline') {
return;
}
parser.processToken(grandChildren, slots[slotName].buffer);

@@ -241,3 +240,5 @@ });

if (slots[slotName].buffer.size) {
const fnCall = slots[slotName].props ? `function (${slots[slotName].props}) {` : 'function () {';
const fnCall = slots[slotName].props
? `function (${slots[slotName].props}) {`
: 'function () {';
slots[slotName].buffer.wrap(fnCall, '}');

@@ -244,0 +245,0 @@ obj.add(slotName, slots[slotName].buffer.disableFileAndLineVariables().flush());

"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.debuggerTag = void 0;
/**

@@ -18,2 +19,3 @@ * Add debugger break point to the compiled template

tagName: 'debugger',
noNewLine: true,
/**

@@ -20,0 +22,0 @@ * Compiles `@debugger` tags

"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -14,2 +14,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
exports.eachTag = void 0;
const lodash_size_1 = __importDefault(require("lodash.size"));

@@ -16,0 +17,0 @@ const lodash_foreach_1 = __importDefault(require("lodash.foreach"));

"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.elseTag = void 0;
exports.elseTag = {

@@ -12,0 +13,0 @@ block: false,

"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.elseIfTag = void 0;
const edge_parser_1 = require("edge-parser");

@@ -12,0 +13,0 @@ const utils_1 = require("../utils");

"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ifTag = void 0;
const edge_parser_1 = require("edge-parser");

@@ -12,0 +13,0 @@ const utils_1 = require("../utils");

"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.includeTag = exports.getRenderExpression = exports.ALLOWED_EXPRESSION = void 0;
const edge_parser_1 = require("edge-parser");

@@ -37,3 +38,6 @@ const utils_1 = require("../utils");

const renderArgs = localVariables.length
? [parser.utils.stringify(parsedExpression), localVariables.map((localVar) => `"${localVar}"`).join(',')]
? [
parser.utils.stringify(parsedExpression),
localVariables.map((localVar) => `"${localVar}"`).join(','),
]
: [parser.utils.stringify(parsedExpression)];

@@ -40,0 +44,0 @@ /**

"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.includeIfTag = void 0;
const edge_error_1 = require("edge-error");

@@ -12,0 +13,0 @@ const edge_parser_1 = require("edge-parser");

"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.super = exports.section = exports.layout = exports.yield = exports.unless = exports.set = exports.debugger = exports.slot = exports.component = exports.each = exports.includeIf = exports.include = exports.elseif = exports.else = exports.if = void 0;
var If_1 = require("./If");
exports.if = If_1.ifTag;
Object.defineProperty(exports, "if", { enumerable: true, get: function () { return If_1.ifTag; } });
var Else_1 = require("./Else");
exports.else = Else_1.elseTag;
Object.defineProperty(exports, "else", { enumerable: true, get: function () { return Else_1.elseTag; } });
var ElseIf_1 = require("./ElseIf");
exports.elseif = ElseIf_1.elseIfTag;
Object.defineProperty(exports, "elseif", { enumerable: true, get: function () { return ElseIf_1.elseIfTag; } });
var Include_1 = require("./Include");
exports.include = Include_1.includeTag;
Object.defineProperty(exports, "include", { enumerable: true, get: function () { return Include_1.includeTag; } });
var IncludeIf_1 = require("./IncludeIf");
exports.includeIf = IncludeIf_1.includeIfTag;
Object.defineProperty(exports, "includeIf", { enumerable: true, get: function () { return IncludeIf_1.includeIfTag; } });
var Each_1 = require("./Each");
exports.each = Each_1.eachTag;
Object.defineProperty(exports, "each", { enumerable: true, get: function () { return Each_1.eachTag; } });
var Component_1 = require("./Component");
exports.component = Component_1.componentTag;
Object.defineProperty(exports, "component", { enumerable: true, get: function () { return Component_1.componentTag; } });
var Slot_1 = require("./Slot");
exports.slot = Slot_1.slotTag;
Object.defineProperty(exports, "slot", { enumerable: true, get: function () { return Slot_1.slotTag; } });
var Debugger_1 = require("./Debugger");
exports.debugger = Debugger_1.debuggerTag;
Object.defineProperty(exports, "debugger", { enumerable: true, get: function () { return Debugger_1.debuggerTag; } });
var Set_1 = require("./Set");
exports.set = Set_1.setTag;
Object.defineProperty(exports, "set", { enumerable: true, get: function () { return Set_1.setTag; } });
var Unless_1 = require("./Unless");
exports.unless = Unless_1.unlessTag;
Object.defineProperty(exports, "unless", { enumerable: true, get: function () { return Unless_1.unlessTag; } });
var Yield_1 = require("./Yield");
exports.yield = Yield_1.yieldTag;
Object.defineProperty(exports, "yield", { enumerable: true, get: function () { return Yield_1.yieldTag; } });
var Layout_1 = require("./Layout");
exports.layout = Layout_1.layoutTag;
Object.defineProperty(exports, "layout", { enumerable: true, get: function () { return Layout_1.layoutTag; } });
var Section_1 = require("./Section");
exports.section = Section_1.sectionTag;
Object.defineProperty(exports, "section", { enumerable: true, get: function () { return Section_1.sectionTag; } });
var Super_1 = require("./Super");
exports.super = Super_1.superTag;
Object.defineProperty(exports, "super", { enumerable: true, get: function () { return Super_1.superTag; } });
"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.layoutTag = void 0;
/**

@@ -19,2 +20,3 @@ * Layout tag is used to define parent layout for a given template. The layout

tagName: 'layout',
noNewLine: true,
compile() {

@@ -21,0 +23,0 @@ // The layouts are handled by the template itself. I am just a way to

"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.sectionTag = void 0;
/**

@@ -12,0 +13,0 @@ * Section tag is used to define the sections on a given template. Sections cannot be

"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.setTag = void 0;
const edge_error_1 = require("edge-error");

@@ -36,2 +37,3 @@ const edge_parser_1 = require("edge-parser");

tagName: 'set',
noNewLine: true,
/**

@@ -38,0 +40,0 @@ * Compiles else block node to Javascript else statement

"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.slotTag = void 0;
const edge_error_1 = require("edge-error");

@@ -20,2 +21,3 @@ /**

tagName: 'slot',
noNewLine: true,
compile(_, __, token) {

@@ -22,0 +24,0 @@ throw new edge_error_1.EdgeError('@slot tag must appear as top level tag inside the @component tag', 'E_ORPHAN_SLOT_TAG', {

"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.superTag = void 0;
const edge_error_1 = require("edge-error");

@@ -12,0 +13,0 @@ /**

"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.unlessTag = void 0;
const edge_parser_1 = require("edge-parser");

@@ -12,0 +13,0 @@ const utils_1 = require("../utils");

"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.yieldTag = void 0;
const edge_parser_1 = require("edge-parser");

@@ -73,3 +74,3 @@ const utils_1 = require("../utils");

buffer.writeStatement('} else {', token.filename, -1);
token.children.forEach((child) => (parser.processToken(child, buffer)));
token.children.forEach((child) => parser.processToken(child, buffer));
}

@@ -76,0 +77,0 @@ buffer.writeStatement('}', token.filename, -1);

@@ -22,3 +22,3 @@ import { CompilerContract } from '../Contracts';

*/
trimTopBottomNewLines(value: any): any;
trimTopBottomNewLines(value: string): string;
/**

@@ -25,0 +25,0 @@ * Render the template inline by sharing the state of the current template.

"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
var __importDefault = (this && this.__importDefault) || function (mod) {

@@ -14,2 +14,3 @@ return (mod && mod.__esModule) ? mod : { "default": mod };

Object.defineProperty(exports, "__esModule", { value: true });
exports.Template = void 0;
const lodash_merge_1 = __importDefault(require("lodash.merge"));

@@ -16,0 +17,0 @@ const Context_1 = require("../Context");

"use strict";
/*
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
* edge
*
* (c) Harminder Virk <virk@adonisjs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseJsArg = exports.isNotSubsetOf = exports.isSubsetOf = exports.unallowedExpression = void 0;
const edge_error_1 = require("edge-error");

@@ -12,0 +13,0 @@ /**

<a name="1.1.4"></a>
## [1.1.4](https://github.com/poppinss/edge/compare/v1.1.3...v1.1.4) (2018-01-26)
### Bug Fixes
* **memberexpression:** parse nested memberexpression ([5aee3ba](https://github.com/poppinss/edge/commit/5aee3ba)), closes [#21](https://github.com/poppinss/edge/issues/21)
- **memberexpression:** parse nested memberexpression ([5aee3ba](https://github.com/poppinss/edge/commit/5aee3ba)), closes [#21](https://github.com/poppinss/edge/issues/21)
<a name="1.1.3"></a>
<a name="1.1.3"></a>
## [1.1.3](https://github.com/poppinss/edge/compare/v1.1.2...v1.1.3) (2017-11-27)
### Bug Fixes
* **include:** allow callExpression inside include ([cbbe629](https://github.com/poppinss/edge/commit/cbbe629))
* **ReDoS:** Regular Expression Denial of Service (#7) ([39777cc](https://github.com/poppinss/edge/commit/39777cc))
- **include:** allow callExpression inside include ([cbbe629](https://github.com/poppinss/edge/commit/cbbe629))
- **ReDoS:** Regular Expression Denial of Service (#7) ([39777cc](https://github.com/poppinss/edge/commit/39777cc))
### Features
* **edge:** add edge.new method to newup isolated template ([5db5710](https://github.com/poppinss/edge/commit/5db5710))
* **globals:** add orderBy method ([6ad7190](https://github.com/poppinss/edge/commit/6ad7190))
- **edge:** add edge.new method to newup isolated template ([5db5710](https://github.com/poppinss/edge/commit/5db5710))
- **globals:** add orderBy method ([6ad7190](https://github.com/poppinss/edge/commit/6ad7190))
<a name="1.1.2"></a>
<a name="1.1.2"></a>
## [1.1.2](https://github.com/poppinss/edge/compare/v1.1.1...v1.1.2) (2017-10-29)
### Bug Fixes
* **ast:** trim whitespace in tag end ([2ff8b36](https://github.com/poppinss/edge/commit/2ff8b36)), closes [#3](https://github.com/poppinss/edge/issues/3)
* **component:** access globals and optionally share data ([5bc9889](https://github.com/poppinss/edge/commit/5bc9889)), closes [#2](https://github.com/poppinss/edge/issues/2)
- **ast:** trim whitespace in tag end ([2ff8b36](https://github.com/poppinss/edge/commit/2ff8b36)), closes [#3](https://github.com/poppinss/edge/issues/3)
- **component:** access globals and optionally share data ([5bc9889](https://github.com/poppinss/edge/commit/5bc9889)), closes [#2](https://github.com/poppinss/edge/issues/2)
### Features
* **tags:** add set tag ([a6735fc](https://github.com/poppinss/edge/commit/a6735fc))
- **tags:** add set tag ([a6735fc](https://github.com/poppinss/edge/commit/a6735fc))
### Reverts
* **component:** remove option to share data with component ([83c57e5](https://github.com/poppinss/edge/commit/83c57e5))
- **component:** remove option to share data with component ([83c57e5](https://github.com/poppinss/edge/commit/83c57e5))
<a name="1.1.1"></a>
<a name="1.1.1"></a>
## [1.1.1](https://github.com/poppinss/edge/compare/v1.1.0...v1.1.1) (2017-10-08)
### Features
* **tags:** add mustache tag ([d46022e](https://github.com/poppinss/edge/commit/d46022e))
- **tags:** add mustache tag ([d46022e](https://github.com/poppinss/edge/commit/d46022e))
<a name="1.1.0"></a>
<a name="1.1.0"></a>
# [1.1.0](https://github.com/poppinss/edge/compare/v1.0.2...v1.1.0) (2017-09-23)
### Features
* **tags:** allow multiline tags ([e7783f5](https://github.com/poppinss/edge/commit/e7783f5))
- **tags:** allow multiline tags ([e7783f5](https://github.com/poppinss/edge/commit/e7783f5))
<a name="1.0.2"></a>
<a name="1.0.2"></a>
## [1.0.2](https://github.com/poppinss/edge/compare/v1.0.1...v1.0.2) (2017-08-08)
### Bug Fixes
* **context:** bind context to global functions ([e0a2685](https://github.com/poppinss/edge/commit/e0a2685))
- **context:** bind context to global functions ([e0a2685](https://github.com/poppinss/edge/commit/e0a2685))
### Features
* **globals:** add elIf ([fb522ce](https://github.com/poppinss/edge/commit/fb522ce))
- **globals:** add elIf ([fb522ce](https://github.com/poppinss/edge/commit/fb522ce))
<a name="1.0.1"></a>
<a name="1.0.1"></a>
## [1.0.1](https://github.com/poppinss/edge/compare/v1.0.0...v1.0.1) (2017-06-21)
### Features
* **globals:** add globals ([7ddbb1e](https://github.com/poppinss/edge/commit/7ddbb1e))
* **tags:** export BaseTag to be extended by custom tags ([cfdfd04](https://github.com/poppinss/edge/commit/cfdfd04))
* **template:** edge.share now merges locals ([7402af4](https://github.com/poppinss/edge/commit/7402af4))
- **globals:** add globals ([7ddbb1e](https://github.com/poppinss/edge/commit/7ddbb1e))
- **tags:** export BaseTag to be extended by custom tags ([cfdfd04](https://github.com/poppinss/edge/commit/cfdfd04))
- **template:** edge.share now merges locals ([7402af4](https://github.com/poppinss/edge/commit/7402af4))
<a name="1.0.0"></a>
<a name="1.0.0"></a>
# 1.0.0 (2017-03-30)
### Bug Fixes
* **tags:** allow nested each loops ([47ebd9c](https://github.com/poppinss/edge/commit/47ebd9c))
- **tags:** allow nested each loops ([47ebd9c](https://github.com/poppinss/edge/commit/47ebd9c))
### Features
* **ast:** add support for inline & block comments ([cb06a6b](https://github.com/poppinss/edge/commit/cb06a6b))
* **ast:** add support for self closing tags ([016bf48](https://github.com/poppinss/edge/commit/016bf48))
* **cache:** support for in-memory cache ([7e7b61b](https://github.com/poppinss/edge/commit/7e7b61b))
* **component:** add support for define presenter ([7a90885](https://github.com/poppinss/edge/commit/7a90885))
* **context:** add safe method to ignore escaping ([dfb7d46](https://github.com/poppinss/edge/commit/dfb7d46))
* **each:** add support for inlcude inside each ([c876c2d](https://github.com/poppinss/edge/commit/c876c2d))
* **each-tag:** add `isEven` and `isOdd` to ([9be4fbe](https://github.com/poppinss/edge/commit/9be4fbe))
* **edge:** add support for cache ([3e46c85](https://github.com/poppinss/edge/commit/3e46c85))
* **expression:** add support for conditional expression ([6b6d1d2](https://github.com/poppinss/edge/commit/6b6d1d2))
* **globals:** add couple of globals ([f1bf6e0](https://github.com/poppinss/edge/commit/f1bf6e0))
* **if:** add support for unary expression ([15ea142](https://github.com/poppinss/edge/commit/15ea142))
* **layout:** add support for [@super](https://github.com/super) keyword ([8f79a9b](https://github.com/poppinss/edge/commit/8f79a9b))
* **layout:** implement layouts ([56ed7c9](https://github.com/poppinss/edge/commit/56ed7c9))
* **tag:** add debugger tag ([65ac9cd](https://github.com/poppinss/edge/commit/65ac9cd))
* **tag:** add raw tag ([9498e63](https://github.com/poppinss/edge/commit/9498e63))
* **tag:** add unless tag ([5c86bb0](https://github.com/poppinss/edge/commit/5c86bb0))
* **tags:** implement yield tag ([e1445d8](https://github.com/poppinss/edge/commit/e1445d8))
- **ast:** add support for inline & block comments ([cb06a6b](https://github.com/poppinss/edge/commit/cb06a6b))
- **ast:** add support for self closing tags ([016bf48](https://github.com/poppinss/edge/commit/016bf48))
- **cache:** support for in-memory cache ([7e7b61b](https://github.com/poppinss/edge/commit/7e7b61b))
- **component:** add support for define presenter ([7a90885](https://github.com/poppinss/edge/commit/7a90885))
- **context:** add safe method to ignore escaping ([dfb7d46](https://github.com/poppinss/edge/commit/dfb7d46))
- **each:** add support for inlcude inside each ([c876c2d](https://github.com/poppinss/edge/commit/c876c2d))
- **each-tag:** add `isEven` and `isOdd` to ([9be4fbe](https://github.com/poppinss/edge/commit/9be4fbe))
- **edge:** add support for cache ([3e46c85](https://github.com/poppinss/edge/commit/3e46c85))
- **expression:** add support for conditional expression ([6b6d1d2](https://github.com/poppinss/edge/commit/6b6d1d2))
- **globals:** add couple of globals ([f1bf6e0](https://github.com/poppinss/edge/commit/f1bf6e0))
- **if:** add support for unary expression ([15ea142](https://github.com/poppinss/edge/commit/15ea142))
- **layout:** add support for [@super](https://github.com/super) keyword ([8f79a9b](https://github.com/poppinss/edge/commit/8f79a9b))
- **layout:** implement layouts ([56ed7c9](https://github.com/poppinss/edge/commit/56ed7c9))
- **tag:** add debugger tag ([65ac9cd](https://github.com/poppinss/edge/commit/65ac9cd))
- **tag:** add raw tag ([9498e63](https://github.com/poppinss/edge/commit/9498e63))
- **tag:** add unless tag ([5c86bb0](https://github.com/poppinss/edge/commit/5c86bb0))
- **tags:** implement yield tag ([e1445d8](https://github.com/poppinss/edge/commit/e1445d8))
# The MIT License
Copyright 2019 Harminder virk, contributors
Copyright 2020 thetutlage, contributors

@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

{
"name": "edge.js",
"version": "3.0.5",
"version": "3.1.0",
"description": "Template engine",

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

"release": "np",
"version": "npm run build"
"version": "npm run build",
"format": "prettier --write .",
"sync-labels": "github-label-sync --labels ./node_modules/@adonisjs/mrm-preset/gh-labels.json edge-js/edge"
},

@@ -36,19 +38,24 @@ "repository": {

"devDependencies": {
"@adonisjs/mrm-preset": "^2.3.0",
"@poppinss/dev-utils": "^1.0.6",
"@types/node": "^13.13.4",
"commitizen": "^4.0.5",
"cz-conventional-changelog": "^3.1.0",
"@adonisjs/mrm-preset": "^2.4.0",
"@adonisjs/require-ts": "^1.0.0",
"@poppinss/dev-utils": "^1.0.9",
"@types/node": "^14.6.2",
"commitizen": "^4.2.1",
"cz-conventional-changelog": "^3.3.0",
"dedent-js": "^1.0.1",
"del-cli": "^3.0.0",
"del-cli": "^3.0.1",
"doctoc": "^1.4.0",
"eslint": "^6.8.0",
"eslint-plugin-adonis": "^1.0.9",
"eslint": "^7.8.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-adonis": "^1.0.15",
"eslint-plugin-prettier": "^3.1.4",
"github-label-sync": "^2.0.0",
"husky": "^4.2.5",
"japa": "^3.0.1",
"japa": "^3.1.1",
"js-stringify": "^1.0.2",
"mrm": "^2.3.0",
"np": "^6.2.1",
"ts-node": "^8.9.1",
"typescript": "^3.8.3"
"mrm": "^2.3.5",
"np": "^6.5.0",
"npm-audit-html": "^1.4.3",
"prettier": "^2.1.1",
"typescript": "^4.0.2"
},

@@ -71,4 +78,4 @@ "config": {

"edge-error": "^1.0.4",
"edge-lexer": "^3.0.3",
"edge-parser": "^5.0.6",
"edge-lexer": "^3.1.2",
"edge-parser": "^5.1.2",
"he": "^1.2.0",

@@ -78,3 +85,3 @@ "lodash.foreach": "^4.5.0",

"lodash.size": "^4.2.0",
"macroable": "^4.0.4",
"macroable": "^5.0.2",
"truncatise": "0.0.8"

@@ -84,3 +91,3 @@ },

"hooks": {
"pre-commit": "doctoc README.md --title='## Table of contents' && git add README.md",
"pre-commit": "doctoc README.md --title='## Table of contents' && git add README.md && npm audit --production --json | ./node_modules/.bin/npm-audit-html && git add npm-audit.html",
"commit-msg": "node ./node_modules/@adonisjs/mrm-preset/validateCommit/conventional/validate.js"

@@ -87,0 +94,0 @@ }

@@ -11,2 +11,3 @@ <!-- START doctoc generated TOC please keep comment here to allow auto update -->

# Edge
> Template engine for Node.js with breath of fresh air

@@ -17,11 +18,10 @@

## Maintainers
[Harminder virk](https://github.com/thetutlage)
[appveyor-image]: https://img.shields.io/appveyor/ci/thetutlage/edge/master.svg?style=for-the-badge&logo=appveyor
[appveyor-url]: https://ci.appveyor.com/project/thetutlage/edge "appveyor"
[appveyor-url]: https://ci.appveyor.com/project/thetutlage/edge 'appveyor'
[circleci-image]: https://img.shields.io/circleci/project/github/edge-js/edge/master.svg?style=for-the-badge&logo=circleci
[circleci-url]: https://circleci.com/gh/edge-js/edge "circleci"
[circleci-url]: https://circleci.com/gh/edge-js/edge 'circleci'
[npm-image]: https://img.shields.io/npm/v/edge.js.svg?style=for-the-badge&logo=npm
[npm-url]: https://npmjs.org/package/edge.js "npm"
[npm-url]: https://npmjs.org/package/edge.js 'npm'
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc