Skip to content

Releases: expr-lang/expr

v1.14.0

16 Aug 09:52
8f2cfbf

Choose a tag to compare

Expr is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy, safety, and speed.

expr repl demo

In this release:

  • New builtin functions:

    • abs, int, float, string, max, min
    • trim, trimPrefix, trimSuffix
    • upper, lower
    • split, splitN, splitAfter, splitAfterN
    • replace, repeat, join, indexOf, lastIndexOf
    • hasPrefix, hasSuffix
    • toJSON, fromJSON, toBase64, fromBase64
    • now, duration, date
    • first, last, get
  • New pipe | operator.

    1..9 | filter(# < 5) | map(# * 2)
    

    To enable the pipe operator add expr.ExperimentalPipes() option.

    program, err = expr.Compile(code, expr.ExperimentalPipes())
  • New repl with interactive debugger.

v1.13.0

10 Aug 22:38
e646a93

Choose a tag to compare

Expr is a Go package that offers a fast, simple, and safe engine for compiling and evaluating expressions. Ideal for implementing complex logic in configuration, it serves as a foundation for a dynamic business rule engine without the need for recompiling the program.

all(Tweets, .Len <= 240)

v1.12.7

19 Jul 13:26
d2100ec

Choose a tag to compare

Expr is a Go package that offers a fast, simple, and safe engine for compiling and evaluating expressions. Ideal for implementing complex logic in configuration, it serves as a foundation for a dynamic business rule engine without the need for recompiling the program.

  • Added new opcode OpInvalid for debugging purposes.

v1.12.6

12 Jul 09:03
3c23d10

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.12.5...v1.12.6

v1.12.5

21 Mar 11:08

Choose a tag to compare

fb81647 Fixed param type overwriting in type propagation logic
b3fb3b9 Added a more beautiful program disassemble output

v1.12.4

20 Mar 20:22

Choose a tag to compare

  • Fixed method calls on interfaces 1a1138d

v1.12.3

10 Mar 21:32
e10a35d

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.12.2...v1.12.3

v1.12.2

09 Mar 12:51
5613693

Choose a tag to compare

  • Fixed runtime.Fetch for named slices by @blotus in #349

New Contributors

Full Changelog: v1.12.1...v1.12.2

v1.12.1

22 Feb 22:58

Choose a tag to compare

  • Fixed a bug with builtins and nil argument.

v1.12.0

03 Feb 14:56

Choose a tag to compare

  • Added nil coalescing operator ??.

Example:

user?.Name ?? "Anonymous"