From f0a00de565c26fecf218395e840b7efdc2ee7545 Mon Sep 17 00:00:00 2001 From: Anton Medvedev Date: Tue, 19 Dec 2023 18:03:12 +0100 Subject: [PATCH] Update README.md --- README.md | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 73ef1616..09a9a633 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Expr +

Zx logo Expr

> [!IMPORTANT] > The repository [github.com/antonmedv/expr](https://github.com/antonmedv/expr) moved to [github.com/**expr-lang**/expr](https://github.com/expr-lang/expr). @@ -10,16 +10,21 @@ **Expr** is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy, safety, and speed. -expr logo +**Expr** offers a simple [syntax](https://expr-lang.org/docs/Language-Definition) with powerful features, ensuring ease of use: ```js // Allow only admins and moderators to moderate comments. user.Group in ["admin", "moderator"] || user.Id == comment.UserId ``` +```js +// Determine whether the request is in the permitted time window. +request.Time - resource.Age < duration("24h") +``` + ```js // Ensure all tweets are less than 240 characters. -all(Tweets, .Size <= 240) +all(tweets, len(.Content) <= 240) ``` ## Features @@ -62,18 +67,8 @@ go get github.com/expr-lang/expr ## Documentation -* See [Getting Started](https://expr.medv.io/docs/Getting-Started) page for developer documentation. -* See [Language Definition](https://expr.medv.io/docs/Language-Definition) page to learn the syntax. - -## Expr Code Editor - - - Expr Code Editor - - -Also, I have an embeddable code editor written in JavaScript which allows editing expressions with syntax highlighting and autocomplete based on your types declaration. - -[Learn more →](https://expr-lang.github.io/expr/) +* See [Getting Started](https://expr-lang.org/docs/Getting-Started) page for developer documentation. +* See [Language Definition](https://expr-lang.org/docs/Language-Definition) page to learn the syntax. ## Examples