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

3xpr

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

3xpr - npm Package Compare versions

Comparing version 1.7.7 to 1.7.8

8

expression/contract/managers.d.ts

@@ -79,9 +79,9 @@ import { Type } from './type';

clone(operand: Operand): Operand;
build(expression: string): Operand;
parameters(expression: string): Parameter[];
type(expression: string): string;
build(expression: string, useCache?: boolean): Operand;
parameters(expression: string, useCache?: boolean): Parameter[];
type(expression: string, useCache?: boolean): string;
eval(expression: string, data?: any): any;
run(expression: string, data?: any): any;
run(expression: string, data?: any, useCache?: boolean): any;
subscribe(observer: ActionObserver): void;
unsubscribe(observer: ActionObserver): void;
}

@@ -41,3 +41,3 @@ import { Operand, IExpressions, IParameterManager, IBuilder, Parameter, Format, IOperandBuilder, OperatorMetadata, ITypeManager, IModelManager, ActionObserver, FunctionAdditionalInfo, OperatorAdditionalInfo } from './contract';

*/
parameters(expression: string): Parameter[];
parameters(expression: string, useCache?: boolean): Parameter[];
/**

@@ -48,3 +48,3 @@ * Get type of expression

*/
type(expression: string): string;
type(expression: string, useCache?: boolean): string;
clone(source: Operand): Operand;

@@ -58,6 +58,6 @@ /**

eval(expression: string, data?: any): any;
run(expression: string, data?: any): any;
run(expression: string, data?: any, useCache?: boolean): any;
subscribe(observer: ActionObserver): void;
unsubscribe(observer: ActionObserver): void;
build(expression: string): Operand;
build(expression: string, useCache?: boolean): Operand;
private processBuild;

@@ -64,0 +64,0 @@ private typed;

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

*/
parameters(expression) {
const operand = this.typed(expression);
parameters(expression, useCache = true) {
const operand = this.typed(expression, useCache);
return this.parameterManager.parameters(operand);

@@ -128,4 +128,4 @@ }

*/
type(expression) {
const operand = this.typed(expression);
type(expression, useCache = true) {
const operand = this.typed(expression, useCache);
return contract_1.Type.toString(operand.returnType);

@@ -156,7 +156,7 @@ }

}
run(expression, data = {}) {
run(expression, data = {}, useCache = true) {
const context = new contract_1.Context(new contract_1.Data(data));
try {
this.beforeExecutionNotify(expression, context);
const operand = this.processBuild(expression);
const operand = this.processBuild(expression, useCache);
const result = operand.eval(context);

@@ -182,4 +182,7 @@ this.afterExecutionNotify(expression, context, result);

}
build(expression) {
build(expression, useCache = true) {
try {
if (!useCache) {
return this.basic.build(expression);
}
const key = helper_1.helper.utils.hashCode(expression);

@@ -200,4 +203,7 @@ const value = this.cache.get(key);

}
processBuild(expression) {
processBuild(expression, useCache) {
try {
if (!useCache) {
return this.process.build(expression);
}
const key = helper_1.helper.utils.hashCode(expression);

@@ -218,3 +224,8 @@ const value = this.processCache.get(key);

}
typed(expression) {
typed(expression, useCache) {
if (!useCache) {
const operand = this.basic.build(expression);
this.typeManager.type(operand);
return operand;
}
const key = helper_1.helper.utils.hashCode(expression);

@@ -221,0 +232,0 @@ const value = this.cache.get(key);

{
"name": "3xpr",
"version": "1.7.7",
"version": "1.7.8",
"description": "expressions",

@@ -5,0 +5,0 @@ "author": "Flavio Lionel Rita <flaviolrita@hotmail.com>",

Sorry, the diff of this file is not supported yet

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