Skip to content

Commit

Permalink
chore: readme fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bekacru committed Apr 22, 2024
1 parent ff161f8 commit f286cd5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Better Fetch

A fetch wrapper for typescript that returns the data and the error object. Works on the browser, node (version 18+), workers, deno and bun. Some of the APIs are inspired by [ofetch](https://github.com/unjs/ofetch).

## Why?

While working on a project, I began using ofetch. I appreciated many of its features, but I was particularly drawn to the concept of receiving both data and error objects with each call. This led me to create a fetch wrapper that incorporated this functionality , along with some features borrowed from ofetch.
A fetch wrapper for typescript that returns data and error object. Works on the browser, node (version 18+), workers, deno and bun. Some of the APIs are inspired by [ofetch](https://github.com/unjs/ofetch).

## Installation

Expand All @@ -19,7 +15,7 @@ const { data, error } = await fetch<{
userId: number;
id: number;
title: string;
completed"
completed;
}>("https://jsonplaceholder.typicode.com/todos/1");
if (error) {
// handle the error
Expand Down

0 comments on commit f286cd5

Please sign in to comment.