Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⭐ introduce empty #1884

Merged
merged 1 commit into from
Sep 25, 2023
Merged

⭐ introduce empty #1884

merged 1 commit into from
Sep 25, 2023

Conversation

arlimus
Copy link
Member

@arlimus arlimus commented Sep 25, 2023

Avoids having to double-check values, instead you can simply say:

[] == empty
null == empty
'' == empty
{} == empty

If merged, this feature will be supported in v9, but remain experimental at first.

Helps with #1874

Follow-up: This needs support for list resources, which don't work right now. You have to explicitly request the list:

users.list == empty

Follow-up: Nicer printing on failure/success

Avoids having to double-check values, instead you can simply say:

```coffee
[] == empty
null == empty
'' == empty
{} == empty
```

Signed-off-by: Dominik Richter <[email protected]>
Copy link
Member

@chris-rock chris-rock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition, and makes writing checks much easier.

@arlimus arlimus merged commit cdb057a into main Sep 25, 2023
@arlimus arlimus deleted the dom/empty branch September 25, 2023 16:49
@github-actions github-actions bot locked and limited conversation to collaborators Sep 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants