From dd65f5de267cd3475561d669fa9c67a4b3ee4cc6 Mon Sep 17 00:00:00 2001 From: Anton Nesterov <48190253+nesterow@users.noreply.github.com> Date: Sun, 1 Dec 2024 16:08:57 +0100 Subject: [PATCH] Update README.md --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 574c5d5..a4999bf 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,10 @@ Simplified result/error handling for JavaScript. Grip always returns a consistent call result ready to be handled. It makes the control flow similar to that of Golang, but doesn't force you to make additional null checks or create transitional variables to hold error results. +> Grip doesn't force you to write code in a specific style or avoid using throw. It is just a helper that unwraps try-catch. -Instead of returning a nullish error, Grip always returns a consistent status object: + +Instead of returning a nullish error, Grip always returns a consistent status interface: ```javascript const [value, status] = grip(callable) // or {value, status} @@ -117,7 +119,7 @@ const [result1, status1] = grip(() => { ## Handle generators -Generators can be handled using the `Iter()` method: +Generators can be handled using the `iter()` method: ```javascript const res = grip(async function* () {