Vigyata.AI
Is this your channel?
GithubGithub02

25 Add unless to JsonResource

This PR introduces unless() for JsonResource, which is just the opposite of when(). It’s a small addition, but it makes resource conditions read nicer when the logic is “show this only if NOT something.”

Buy on Github

You'll be taken to Github to complete your purchase.

Pros

  • +Opposite of when(), so negative conditions read cleaner
  • +Reduces manual if/else logic inside resources

Cons

  • -If overused, it can make resource conditions harder to scan quickly

Featured in this video