github expr-lang/expr v1.14.0

latest releases: v1.16.9, v1.16.8, v1.16.7...
13 months ago

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.

Don't miss a new expr release

NewReleases is sending notifications on new releases.