@journeyapps/evaluator
Advanced tools
Comparing version 0.0.0-dev-20230713095442 to 0.0.0-dev-20230713120451
@@ -43,1 +43,2 @@ import { TokenExpression } from './token-expressions/TokenExpression'; | ||
}; | ||
export declare function unescape(s: string): string; |
@@ -7,3 +7,2 @@ import { FunctionTokenExpression } from './token-expressions/FunctionTokenExpression'; | ||
import { LegacyFunctionTokenExpression } from './token-expressions/LegacyFunctionTokenExpression'; | ||
export declare function unescape(s: string): string; | ||
export declare function getObjectType(parent: any, name: string): any; | ||
@@ -10,0 +9,0 @@ export declare function deepMerge(a: any, b: any): any; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parseEnclosingBraces = exports._compile = exports.FormatString = void 0; | ||
exports.unescape = exports.parseEnclosingBraces = exports._compile = exports.FormatString = void 0; | ||
const tools_1 = require("./tools"); | ||
@@ -168,8 +168,8 @@ const FunctionTokenExpression_1 = require("./token-expressions/FunctionTokenExpression"); | ||
var recordings = []; | ||
for (var i = 0; i < tokens.length; i++) { | ||
var token = tokens[i]; | ||
for (let i = 0; i < tokens.length; i++) { | ||
const token = tokens[i]; | ||
if (!token.isConstant()) { | ||
var expression = token.expression; | ||
const expression = token.expression; | ||
// We are interested in the type and name of the final two variables in the expression | ||
var arrayOfVariables = scopeType.getVariableTypeAndNameWithParent(expression); | ||
const arrayOfVariables = scopeType.getVariableTypeAndNameWithParent(expression); | ||
if (arrayOfVariables[0] == null && scopeType.name != 'view') { | ||
@@ -309,2 +309,19 @@ // This can happen in, e.g., an object table where the attribute is on its own as a property | ||
exports.parseEnclosingBraces = parseEnclosingBraces; | ||
function unescape(s) { | ||
let start = 0; | ||
let result = ''; | ||
const len = s.length; | ||
while (true) { | ||
const i = s.indexOf('}', start); | ||
if (i == -1 || i == len - 1) { | ||
result += s.substring(start); | ||
break; | ||
} | ||
result += s.substring(start, i + 1); | ||
// We assume that the character at i+1 is another right brace, but we don't do any checking. | ||
start = i + 2; | ||
} | ||
return result; | ||
} | ||
exports.unescape = unescape; | ||
//# sourceMappingURL=FormatString.js.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports._deepMerge = exports.formatValueAsync = exports.formatValue = exports.actionableTokenExpression = exports.functionTokenExpression = exports.formatString = exports.extract = exports.deepMerge = exports.getObjectType = exports.unescape = void 0; | ||
exports._deepMerge = exports.formatValueAsync = exports.formatValue = exports.actionableTokenExpression = exports.functionTokenExpression = exports.formatString = exports.extract = exports.deepMerge = exports.getObjectType = void 0; | ||
const FunctionTokenExpression_1 = require("./token-expressions/FunctionTokenExpression"); | ||
@@ -9,19 +9,2 @@ const ShorthandTokenExpression_1 = require("./token-expressions/ShorthandTokenExpression"); | ||
const LegacyFunctionTokenExpression_1 = require("./token-expressions/LegacyFunctionTokenExpression"); | ||
function unescape(s) { | ||
var start = 0; | ||
var result = ''; | ||
var len = s.length; | ||
while (true) { | ||
var i = s.indexOf('}', start); | ||
if (i == -1 || i == len - 1) { | ||
result += s.substring(start); | ||
break; | ||
} | ||
result += s.substring(start, i + 1); | ||
// We assume that the character at i+1 is another right brace, but we don't do any checking. | ||
start = i + 2; | ||
} | ||
return result; | ||
} | ||
exports.unescape = unescape; | ||
function getObjectType(parent, name) { | ||
@@ -28,0 +11,0 @@ var variable = parent.getAttribute(name); |
{ | ||
"name": "@journeyapps/evaluator", | ||
"version": "0.0.0-dev-20230713095442", | ||
"version": "0.0.0-dev-20230713120451", | ||
"description": "Journey Evaluator library", | ||
@@ -19,2 +19,4 @@ "main": "./dist/src/index.js", | ||
"build": "../node_modules/.bin/tsc --build", | ||
"watch": "tsc -b --watch", | ||
"clean": "tsc -b --clean && rm -rf dist", | ||
"test": "pnpm build && pnpm test:node && pnpm test:browser", | ||
@@ -21,0 +23,0 @@ "test:browser": "karma start karma.conf.js --single-run", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
126567