Socket
Socket
Sign inDemoInstall

@oat-sa/expr-eval

Package Overview
Dependencies
Maintainers
22
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oat-sa/expr-eval - npm Package Versions

2.1.4

Diff

Changelog

Source

2.1.4 - 2023-08-25

  • Fix ADF-1568 : Vulnerabilities in dependencies #19
jsconan
published 2.1.3 •

Changelog

Source

2.1.3 - 2023-04-27

jsconan
published 2.1.2 •

Changelog

Source

2.1.2 - 2023-03-03

jsconan
published 2.1.1 •

Changelog

Source

2.1.1 - 2023-03-01

  • Fix TR-5072 : Correct precedence for compound percentage operator #12
jsconan
published 2.1.0 •

Changelog

Source

2.1.0 - 2023-02-27

jsconan
published 2.0.0 •

Changelog

Source

2.0.0 - 2023-02-23

Add changes from version 2.0.2 of the base repository.

Also, fix a security issue by replacing Uglify with Terser

Added

  • Added non-default exports when using the ES module format. This allows import { Parser } from 'expr-eval' to work in TypeScript. The default export is still available for backward compatibility.

  • Added the if(condition, trueValue, falseValue) function back. The ternary operator is still recommended if you need to only evaluate one branch, but we're keep this as an option at least for now.

  • Better support for arrays, including literals: [ 1, 2, 3 ] and indexing: array[0]

  • New functions for arrays: join, indexOf, map, filter, and fold

  • Variable assignment: x = 4

  • Custom function definitions: myfunction(x, y) = x * y

  • Evaluate multiple expressions by separating them with ;

  • New operators: log2 (base-2 logarithm), cbrt (cube root), expm1 (e^x - 1), log1p (log(1 + x)), sign (essentially x == 0 ? 0 : x / abs x)

Changed

  • min and max functions accept either a parameter list or a single array argument
  • in operator is enabled by default. It can be disabled by passing { operators: { 'in': false } } to the Parser constructor.
  • || (concatenation operator) now supports strings and arrays

Removed

  • Removed the if(condition, trueValue, falseValue) function. Use the ternary conditional operator instead: condition ? trueValue : falseValue, or you can add it back easily with a custom function.
jsconan
published 1.3.2 •

Changelog

Source

1.3.2 - 2023-02-22

Security fix from #6

jsconan
published 1.3.1 •

Changelog

Source

1.3.1 - 2023-02-22

Add changes from version 1.2.3 of the base repository.

Also, update the dependencies: these are only tooling, so they should not harm.

  • Silentmatt v1.2.3 #4
tamasbesenyei
published 1.3.0 •

Changelog

Source

1.3.0 - 2019-01-31

[Feature] TAO-7378 Allow to use functions as binary operators when they are prefixed with a @. #1

Fork from silentmatt/expr-eval v1.2.2

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