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

@evergis/condition

Package Overview
Dependencies
Maintainers
6
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evergis/condition - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

4

dist/ConditionInterpreter.d.ts
import { ExpressionTokenizerError } from './ExpressionTokenizer';
import { BoolNodeVisitReturnType, Expression } from './ConditionVisitor';
import { ExpressionVisitorError } from './ExpressionVisitor';
declare type ConditionInterpreterResult = null | BoolNodeVisitReturnType | ExpressionVisitorError | ExpressionTokenizerError | Expression;
export declare const isBoolResult: (result: ConditionInterpreterResult) => result is BoolNodeVisitReturnType;
export declare const isExpression: (result: ConditionInterpreterResult) => result is Expression;
export declare class ConditionInterpreter {

@@ -10,1 +13,2 @@ private readonly tokenizer;

}
export {};

8

dist/ConditionInterpreter.js

@@ -7,4 +7,4 @@ "use strict";

const isObject_1 = require("./isObject");
const isBoolResult = (result) => isObject_1.isObject(result) && 'boolOperations' in result;
const isExpression = (result) => isObject_1.isObject(result) && 'attribute' in result;
exports.isBoolResult = (result) => isObject_1.isObject(result) && 'boolOperations' in result;
exports.isExpression = (result) => isObject_1.isObject(result) && 'attribute' in result;
class ConditionInterpreter {

@@ -23,6 +23,6 @@ constructor(condition) {

const result = ast && ast.accept(new ConditionVisitor_1.ConditionVisitor());
if (isBoolResult(result)) {
if (exports.isBoolResult(result)) {
this.result = result;
}
else if (isExpression(result)) {
else if (exports.isExpression(result)) {
this.result = {

@@ -29,0 +29,0 @@ boolOperations: [],

export { AcceptTree } from './AcceptTree';
export { Char } from './Char';
export { ConditionEvaluator } from './ConditionEvaluator';
export { ConditionInterpreter } from './ConditionInterpreter';
export { ConditionInterpreter, isBoolResult, isExpression } from './ConditionInterpreter';
export { ConditionVisitor, ConditionVisitorReturnType, Expression, BoolNodeVisitReturnType, } from './ConditionVisitor';

@@ -6,0 +6,0 @@ export { evaluateCondition } from './evaluateCondition';

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

exports.ConditionInterpreter = ConditionInterpreter_1.ConditionInterpreter;
exports.isBoolResult = ConditionInterpreter_1.isBoolResult;
exports.isExpression = ConditionInterpreter_1.isExpression;
var ConditionVisitor_1 = require("./ConditionVisitor");

@@ -13,0 +15,0 @@ exports.ConditionVisitor = ConditionVisitor_1.ConditionVisitor;

{
"name": "@evergis/condition",
"version": "1.0.2",
"version": "1.0.3",
"description": "Condition parser for spcore expressions",

@@ -5,0 +5,0 @@ "author": "Kirill Protasov <kprotasov@everpoint.ru>",

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