@journeyapps/evaluator
Advanced tools
Comparing version 0.0.0-dev.ae608c2.224c284 to 0.0.0-dev.c9e154e.8149662
@@ -5,6 +5,2 @@ import { TokenExpression } from './token-expressions/TokenExpression'; | ||
import { FormatStringScope } from './FormatStringScope'; | ||
export declare enum FormatStringOrigin { | ||
CONTENT = "content", | ||
ATTRIBUTE = "attribute" | ||
} | ||
/** | ||
@@ -16,4 +12,3 @@ * Construct a new format string expression. | ||
tokens: TokenExpression[]; | ||
origin: FormatStringOrigin; | ||
constructor(expression: string, origin?: FormatStringOrigin); | ||
constructor(expression: string); | ||
toString(): string; | ||
@@ -20,0 +15,0 @@ /** |
@@ -5,3 +5,3 @@ import { TokenExpression } from './token-expressions/TokenExpression'; | ||
import { FormatShorthandTokenExpression } from './token-expressions/FormatShorthandTokenExpression'; | ||
import { FormatString, FormatStringOrigin } from './FormatString'; | ||
import { FormatString } from './FormatString'; | ||
import { TypeInterface } from './TypeInterface'; | ||
@@ -25,3 +25,3 @@ import { LegacyFunctionTokenExpression } from './token-expressions/LegacyFunctionTokenExpression'; | ||
*/ | ||
export declare function formatString(expression: string, origin?: FormatStringOrigin): FormatString | null; | ||
export declare function formatString(expression: string): FormatString | null; | ||
/** | ||
@@ -28,0 +28,0 @@ # Construct a function token expression from a raw expression string. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const tools_1 = require("./tools"); | ||
var FormatStringOrigin; | ||
(function (FormatStringOrigin) { | ||
FormatStringOrigin["CONTENT"] = "content"; | ||
FormatStringOrigin["ATTRIBUTE"] = "attribute"; | ||
})(FormatStringOrigin = exports.FormatStringOrigin || (exports.FormatStringOrigin = {})); | ||
/** | ||
@@ -13,6 +8,5 @@ * Construct a new format string expression. | ||
class FormatString { | ||
constructor(expression, origin = FormatStringOrigin.ATTRIBUTE) { | ||
constructor(expression) { | ||
this.expression = expression || ''; | ||
this.tokens = tools_1.compile(this.expression); | ||
this.origin = origin; | ||
} | ||
@@ -19,0 +13,0 @@ toString() { |
@@ -212,3 +212,3 @@ "use strict"; | ||
*/ | ||
function formatString(expression, origin = FormatString_1.FormatStringOrigin.ATTRIBUTE) { | ||
function formatString(expression) { | ||
if (expression == null) { | ||
@@ -218,3 +218,3 @@ return null; | ||
else { | ||
return new FormatString_1.FormatString(expression, origin); | ||
return new FormatString_1.FormatString(expression); | ||
} | ||
@@ -221,0 +221,0 @@ } |
{ | ||
"name": "@journeyapps/evaluator", | ||
"version": "0.0.0-dev.ae608c2.224c284", | ||
"version": "0.0.0-dev.c9e154e.8149662", | ||
"description": "Journey JS library", | ||
@@ -14,3 +14,3 @@ "main": "./dist/src/index.js", | ||
"dependencies": { | ||
"@journeyapps/core-xml": "0.0.0-dev.ae608c2.224c284" | ||
"@journeyapps/core-xml": "0.0.0-dev.c9e154e.8149662" | ||
}, | ||
@@ -21,3 +21,3 @@ "files": [ | ||
], | ||
"gitHead": "e1cedf0b9f9515cbca7436ed517e9bbdad9560b4" | ||
"gitHead": "ed57057c2c3e100b9d95645229fd9c2a902102b5" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91541
1141
+ Added@journeyapps/core-xml@0.0.0-dev.c9e154e.8149662(transitive)
- Removed@journeyapps/core-xml@0.0.0-dev.ae608c2.224c284(transitive)