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

@journeyapps/evaluator

Package Overview
Dependencies
Maintainers
2
Versions
266
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@journeyapps/evaluator - npm Package Compare versions

Comparing version 0.0.0-dev.20439a3 to 0.0.0-dev.2128b02

dist/definitions/FormatStringScope.js

5

dist/@types/FormatString.d.ts

@@ -5,2 +5,5 @@ import { AttributeValidationError } from '@journeyapps/core-xml';

import { TokenExpression } from './token-expressions';
export interface FormatStringOptions {
expression: string;
}
/**

@@ -14,4 +17,4 @@ * Construct a new format string expression.

tokens: TokenExpression[];
constructor(expression: string);
static isInstanceOf(val: any): val is FormatString;
constructor(options: FormatStringOptions);
/**

@@ -18,0 +21,0 @@ * Compile a format string expression into tokens.

4

dist/@types/parsers/IdentifierExpressionParser.d.ts

@@ -6,3 +6,5 @@ import { Identifier } from '@babel/types';

export declare class IdentifierExpressionParser extends AbstractExpressionParser<Identifier, IdentifierExpressionParsedType> {
parse(event: ExpressionNodeEvent<Identifier>): FunctionTokenExpression | ShorthandTokenExpression<import("../token-expressions").TokenExpressionOptions>;
parse(event: ExpressionNodeEvent<Identifier>): FunctionTokenExpression | ShorthandTokenExpression<{
expression: string;
}>;
}

@@ -9,0 +11,0 @@ export declare class IdentifierExpressionParserFactory extends ExpressionParserFactory<IdentifierExpressionParser> {

import { DirectiveLiteral, Literal } from '@babel/types';
import { ConstantTokenExpression, PrimitiveConstantTokenExpression } from '../token-expressions';
import { ConstantTokenExpression } from '../token-expressions';
import { AbstractExpressionParser, ExpressionParserFactory, ExpressionNodeEvent } from './AbstractExpressionParser';
export type LiteralExpression = Literal | DirectiveLiteral;
export declare class LiteralExpressionParser extends AbstractExpressionParser<LiteralExpression, ConstantTokenExpression> {
parse(event: ExpressionNodeEvent<LiteralExpression>): ConstantTokenExpression | PrimitiveConstantTokenExpression;
parse(event: ExpressionNodeEvent<LiteralExpression>): ConstantTokenExpression;
}

@@ -8,0 +8,0 @@ export declare class LiteralExpressionParserFactory extends ExpressionParserFactory<LiteralExpressionParser> {

@@ -6,3 +6,5 @@ import { MemberExpression } from '@babel/types';

export declare class MemberExpressionParser extends AbstractExpressionParser<MemberExpression, MemberExpressionParsedType> {
parse(event: ExpressionNodeEvent<MemberExpression>): FunctionTokenExpression | ShorthandTokenExpression<import("../token-expressions").TokenExpressionOptions>;
parse(event: ExpressionNodeEvent<MemberExpression>): FunctionTokenExpression | ShorthandTokenExpression<{
expression: string;
}>;
}

@@ -9,0 +11,0 @@ export declare class MemberExpressionParserFactory extends ExpressionParserFactory<MemberExpressionParser> {

import { ObjectExpression } from '@babel/types';
import { ObjectTokenExpression } from '../token-expressions';
import { AbstractExpressionParser, ExpressionParserFactory, ExpressionNodeEvent } from './AbstractExpressionParser';
import { AbstractExpressionParser, ExpressionNodeEvent, ExpressionParserFactory } from './AbstractExpressionParser';
export declare class ObjectExpressionParser extends AbstractExpressionParser<ObjectExpression, ObjectTokenExpression> {

@@ -5,0 +5,0 @@ parse(event: ExpressionNodeEvent<ObjectExpression>): ObjectTokenExpression;

@@ -7,3 +7,5 @@ /**

export declare class ConstantTokenExpression extends TokenExpression {
constructor(expression: string, options?: TokenExpressionOptions);
static TYPE: string;
static isInstanceOf(obj: any): obj is ConstantTokenExpression;
constructor(options: TokenExpressionOptions);
/**

@@ -10,0 +12,0 @@ * Concatenate a token to current token and return a new token.

@@ -6,8 +6,13 @@ /**

import { TokenExpressionOptions } from '../TokenExpression';
export interface PrimitiveConstantTokenExpressionOptions extends TokenExpressionOptions {
expression: any;
}
export declare class PrimitiveConstantTokenExpression extends ConstantTokenExpression {
constructor(expression: any, options?: TokenExpressionOptions);
static TYPE: string;
static isInstanceOf(obj: any): obj is PrimitiveConstantTokenExpression;
constructor(options: PrimitiveConstantTokenExpressionOptions);
/**
* Get the value of the constant token expression.
* Concatenate a token to current token and return a new token.
*/
valueOf(): any;
concat(token: ConstantTokenExpression): ConstantTokenExpression;
}

@@ -13,4 +13,5 @@ /**

export declare class FormatShorthandTokenExpression extends ShorthandTokenExpression<FormatShorthandTokenExpressionOptions> {
constructor(expression: string, options: FormatShorthandTokenExpressionOptions);
static TYPE: string;
constructor(options: FormatShorthandTokenExpressionOptions);
toString(): string;
}

@@ -9,2 +9,4 @@ import { TokenExpression, TokenExpressionOptions } from '../TokenExpression';

export declare class FunctionTokenExpression extends TokenExpression<FunctionTokenExpressionOptions> {
static TYPE: string;
static isInstanceOf(obj: any): obj is FunctionTokenExpression;
/**

@@ -14,3 +16,3 @@ * Prefix for function token expressions.

static PREFIX: string;
constructor(expression: string, options?: FunctionTokenExpressionOptions);
constructor(options: FunctionTokenExpressionOptions);
get arguments(): TokenExpression<TokenExpressionOptions, any>[];

@@ -17,0 +19,0 @@ functionName(): string;

@@ -8,3 +8,4 @@ /**

export declare class LegacyFunctionTokenExpression extends TokenExpression {
constructor(expression: string, options?: TokenExpressionOptions);
static TYPE: string;
constructor(options: TokenExpressionOptions);
/**

@@ -11,0 +12,0 @@ * Generate a constant token expression from legacy function token expression.

@@ -11,5 +11,6 @@ import { FormatStringScope } from '../definitions/FormatStringScope';

export declare class ObjectTokenExpression extends TokenExpression<ObjectExpressionTokenOptions, object> {
constructor(expression: string, options: ObjectExpressionTokenOptions);
static TYPE: string;
constructor(options: ObjectExpressionTokenOptions);
get properties(): Record<string, TokenExpression>;
tokenEvaluatePromise(scope: FormatStringScope): Promise<any>;
}

@@ -8,5 +8,6 @@ import { FormatStringScope } from '../definitions/FormatStringScope';

export declare class ShorthandTokenExpression<O extends TokenExpressionOptions = TokenExpressionOptions> extends TokenExpression<O> {
constructor(expression: string, options?: O);
static TYPE: string;
constructor(options: O);
tokenEvaluatePromise(scope: FormatStringScope): Promise<string>;
}
export declare function formatValueAsync(value: any, type: TypeInterface, format: string): Promise<string>;
import { FormatStringScope } from '../definitions/FormatStringScope';
export interface TokenExpressionOptions {
expression: string;
start?: number;

@@ -14,5 +15,7 @@ format?: string;

export declare abstract class TokenExpression<O extends TokenExpressionOptions = TokenExpressionOptions, V extends any = any> {
type: string;
expression: string;
options: O;
protected constructor(expression: string, options?: O);
isPrimitive: boolean;
protected constructor(type: string, options: O);
abstract tokenEvaluatePromise(scope: FormatStringScope): Promise<V>;

@@ -22,3 +25,2 @@ get start(): number | null;

get format(): string | null;
get isPrimitive(): boolean;
isConstant(): boolean;

@@ -25,0 +27,0 @@ isShorthand(): boolean;

{
"name": "@journeyapps/evaluator",
"version": "0.0.0-dev.20439a3",
"version": "0.0.0-dev.2128b02",
"description": "Journey Evaluator library",

@@ -8,4 +8,3 @@ "main": "./dist/index.js",

"files": [
"dist/src",
"dist/@types"
"dist"
],

@@ -16,3 +15,3 @@ "dependencies": {

"lodash": "^4.17.21",
"@journeyapps/core-xml": "0.0.0-dev.20439a3"
"@journeyapps/core-xml": "0.0.0-dev.2128b02"
},

@@ -19,0 +18,0 @@ "devDependencies": {

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