Skip to content

Commit

Permalink
readme: fix axios badge and update table of contents
Browse files Browse the repository at this point in the history
  • Loading branch information
MellKam committed Jul 9, 2023
1 parent 6a819af commit 5358d86
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 34 deletions.
50 changes: 17 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,14 @@

# Table of Contents

> All items without links are in active development
- [Table of Contents](#table-of-contents)
- [Features](#features)
- Foreword
- [Installation](#installation)
- [Minimal Bundle Size Comparison](#minimal-bundle-size-comparison)
- [Getting Started](#getting-started)
- Clint Core
- Middlewares
- Custom request options
- Resolvers
- Error handing
- Yumi Default Plugins
- Body Resolvers
- HTTP Methods
- JSON Serializer
- Query Serializer
- Optional Plugins
- Authorization
- Timeouts
- Retries
- Progress
- FormURLEncoded
- FormData
- [npmjs.com](#npmjscom)
- [unpkg.com](#unpkgcom)
- [deno.land](#denoland)
- [Getting started](#getting-started)
- [Bundle size comparison](#bundle-size-comparison)

# Features

Expand Down Expand Up @@ -85,16 +69,6 @@ import { yumi } from "https://unpkg.com/yumi-fetch/dist/mod.js";
import { yumi } from "https://deno.land/x/yumi/mod.ts";
```

# Minimal bundle size comparison

| Package | Base API | Minified size | Minified and gzipped size |
| --- | --- | --- | --- |
| yumi-fetch | fetch | <a href="https://bundlejs.com/?q=yumi-fetch&treeshake=%5B%7Byumi%7D%5D" alt="Minified size badge from bundlejs.com"><img src="https://deno.bundlejs.com/?q=yumi-fetch&treeshake=[{yumi}]&badge=minified" /></a> | <a href="https://bundlejs.com/?q=yumi-fetch&treeshake=%5B%7Byumi%7D%5D" alt="Minified and gripped size badge from bundlejs.com"><img src="https://deno.bundlejs.com/?q=yumi-fetch&treeshake=[{yumi}]&badge=" /></a> |
| <a href="https://github.com/elbywan/wretch">wretch</a> | fetch | <a href="https://bundlejs.com/?q=wretch&treeshake=%5B%7Bdefault+as+wretch%7D%5D" alt="Minified size badge from bundlejs.com"><img src="https://deno.bundlejs.com/?q=wretch&treeshake=[{default+as+wretch}]&badge=minified" /></a> | <a href="https://bundlejs.com/?q=wretch&treeshake=%5B%7Bdefault+as+wretch%7D%5D" alt="Minified and gripped size badge from bundlejs.com"><img src="https://deno.bundlejs.com/?q=wretch&treeshake=[{default+as+wretch}]&badge=" /></a> |
| <a href="https://github.com/sindresorhus/ky">ky</a> | fetch | <a href="https://bundlejs.com/?q=ky&treeshake=%5B%7Bdefault+as+ky%7D%5D" alt="Minified size badge from bundlejs.com"><img src="https://deno.bundlejs.com/?q=ky&treeshake=[{default+as+ky}]&badge=minified" /></a> | <a href="https://bundlejs.com/?q=ky&treeshake=%5B%7Bdefault+as+ky%7D%5D" alt="Minified and gripped size badge from bundlejs.com"><img src="https://deno.bundlejs.com/?q=ky&treeshake=[{default+as+ky}]&badge=" /></a> |
| <a href="https://github.com/axios/axios">axios</a> | XMLHttpRequest | <a href="https://bundlejs.com/?q=axios&treeshake=%5B%7Baxios%7D%5D" alt="Minified size badge from bundlejs.com"><img src="https://deno.bundlejs.com/?q=axios&treeshake=[{axios}]&badge=minified" /></a> | <a href="https://bundlejs.com/?q=axios&treeshake=%5B%7Baxios%7D%5D" alt="Minified and gripped size badge from bundlejs.com"><img src="https://deno.bundlejs.com/?q=axios&treeshake=[{axios}]&badge=" /></a> |
| <a href="https://github.com/sindresorhus/got">got</a> | XMLHttpRequest | <a href="https://bundlejs.com/?q=got&treeshake=%5B%7Bdefault+as+got%7D%5D" alt="Minified size badge from bundlejs.com"><img src="https://deno.bundlejs.com/?q=got&treeshake=[{default+as+got}]&badge=minified" /></a> | <a href="https://bundlejs.com/?q=got&treeshake=%5B%7Bdefault+as+got%7D%5D" alt="Minified and gripped size badge from bundlejs.com"><img src="https://deno.bundlejs.com/?q=got&treeshake=[{default+as+got}]&badge=" /></a> |

# Getting started

```ts
Expand Down Expand Up @@ -205,4 +179,14 @@ export const yumi = clientCore
.withPlugin(json());
```

The beauty of this approach is that all these plug-ins seamlessly modify the client type, making it a breeze to work with TypeScript. By composing these plug-ins together, you can create a powerful and flexible client that meets your specific needs.
The beauty of this approach is that all these plug-ins seamlessly modify the client type, making it a breeze to work with TypeScript. By composing these plug-ins together, you can create a powerful and flexible client that meets your specific needs.

# Bundle size comparison

| Package | Base API | Minified size | Minified and gzipped size |
| --- | --- | --- | --- |
| yumi-fetch | fetch | <a href="https://bundlejs.com/?q=yumi-fetch&treeshake=%5B%7Byumi%7D%5D" alt="Minified size badge from bundlejs.com"><img src="https://deno.bundlejs.com/?q=yumi-fetch&treeshake=[{yumi}]&badge=minified" /></a> | <a href="https://bundlejs.com/?q=yumi-fetch&treeshake=%5B%7Byumi%7D%5D" alt="Minified and gripped size badge from bundlejs.com"><img src="https://deno.bundlejs.com/?q=yumi-fetch&treeshake=[{yumi}]&badge=" /></a> |
| <a href="https://github.com/elbywan/wretch">wretch</a> | fetch | <a href="https://bundlejs.com/?q=wretch&treeshake=%5B%7Bdefault+as+wretch%7D%5D" alt="Minified size badge from bundlejs.com"><img src="https://deno.bundlejs.com/?q=wretch&treeshake=[{default+as+wretch}]&badge=minified" /></a> | <a href="https://bundlejs.com/?q=wretch&treeshake=%5B%7Bdefault+as+wretch%7D%5D" alt="Minified and gripped size badge from bundlejs.com"><img src="https://deno.bundlejs.com/?q=wretch&treeshake=[{default+as+wretch}]&badge=" /></a> |
| <a href="https://github.com/sindresorhus/ky">ky</a> | fetch | <a href="https://bundlejs.com/?q=ky&treeshake=%5B%7Bdefault+as+ky%7D%5D" alt="Minified size badge from bundlejs.com"><img src="https://deno.bundlejs.com/?q=ky&treeshake=[{default+as+ky}]&badge=minified" /></a> | <a href="https://bundlejs.com/?q=ky&treeshake=%5B%7Bdefault+as+ky%7D%5D" alt="Minified and gripped size badge from bundlejs.com"><img src="https://deno.bundlejs.com/?q=ky&treeshake=[{default+as+ky}]&badge=" /></a> |
| <a href="https://github.com/axios/axios">axios</a> | XMLHttpRequest | <a href="https://bundlejs.com/?q=axios&treeshake=[{+default+as+axois+}" alt="Minified size badge from bundlejs.com"><img src="https://deno.bundlejs.com?q=axios&treeshake=[{+default+as+axois+}]&badge=minified" /></a> | <a href="https://bundlejs.com/?q=axios&treeshake=[{+default+as+axois+}" alt="Minified and gripped size badge from bundlejs.com"><img src="https://deno.bundlejs.com?q=axios&treeshake=[{+default+as+axois+}]&badge" /></a> |
| <a href="https://github.com/sindresorhus/got">got</a> | XMLHttpRequest | <a href="https://bundlejs.com/?q=got&treeshake=%5B%7Bdefault+as+got%7D%5D" alt="Minified size badge from bundlejs.com"><img src="https://deno.bundlejs.com/?q=got&treeshake=[{default+as+got}]&badge=minified" /></a> | <a href="https://bundlejs.com/?q=got&treeshake=%5B%7Bdefault+as+got%7D%5D" alt="Minified and gripped size badge from bundlejs.com"><img src="https://deno.bundlejs.com/?q=got&treeshake=[{default+as+got}]&badge=" /></a> |
8 changes: 7 additions & 1 deletion src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p align="center">
<a href="https://www.npmjs.com/package/yumi-fetch">
<img alt="npm" src="https://img.shields.io/npm/v/yumi-fetch?color=FF3797&label=NPM">
<img alt="npm" src="https://img.shields.io/npm/v/yumi-fetch?color=FF3797&label=npm">
</a>
<a href="https://deno.land/x/yumi">
<img alt="deno.land" src="https://img.shields.io/github/v/tag/MellKam/yumi-fetch?color=FF3797&label=deno.land%2Fx&logo=deno">
Expand All @@ -15,6 +15,12 @@
<a href="https://github.com/MellKam/soundify/commits/main">
<img src="https://img.shields.io/github/last-commit/MellKam/yumi-fetch?color=FF3797" alt="Last commit" />
</a>
<a href="https://bundlejs.com/?q=yumi-fetch&treeshake=%5B%7B+yumi+%7D%5D">
<img src="https://deno.bundlejs.com/?q=yumi-fetch&treeshake=[{+yumi+}]&badge=minified&color=FF3797" alt="Size of yumi client">
</a>
<a href="https://codecov.io/gh/MellKam/yumi-fetch">
<img src="https://img.shields.io/codecov/c/gh/MellKam/yumi-fetch?color=FF3797&label=coverage" alt="Code test coverage" />
</a>
</p>

<h2 align="center">
Expand Down

0 comments on commit 5358d86

Please sign in to comment.