Skip to content

Commit

Permalink
Merge pull request #5 from romeopeter/dev
Browse files Browse the repository at this point in the history
Change package name from 'simple-fetcher' to 'Fetchfully'.
  • Loading branch information
romeopeter authored Dec 26, 2024
2 parents cf6481d + 906ea69 commit 671812a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Simple Fetcher
# Fetchfully

<!-- <img src="./SimpleFetch.png" style="max-width:300px;display:block" /> -->

<br />

**Simple Fetcher** is an object-first promise-based HTTP client for the browser . It wraps the JavaScript Fetch API with additional functionalities for efficiency and readability. Just supply the objects and that's it!
**Fetchfully** is an object-first and promise-based HTTP client for the browser . It wraps the JavaScript Fetch API with additional functionalities for efficiency and readability. Just supply the objects and that's it!

---

Expand All @@ -24,19 +24,19 @@
Install the package using npm or yarn:

```bash
npm install simple-fetch
npm install fetch-plus

# or

yarn add simple-fetch
yarn add fetch-plus
```

## How To Use

### Basic request

```javascript
import fetcher from "simple-fetch";
import fetcher from "fetch-plus";

// 1. Original
await fetcher({ url: "https://api.example.com/posts" });
Expand Down Expand Up @@ -71,7 +71,7 @@ const query = {
size: "large",
};
const queryArrayFormat = "comma";
await fetch({
await fetcher({
url: "https://api.example.com",
query,
customOption: { queryArrayFormat },
Expand All @@ -85,7 +85,7 @@ await fetch({
* 1. POST request
*
*/
await fetch({
await fetcher({
url: "https://api.example.com/post",
method: "POST",
headers: {
Expand All @@ -102,7 +102,7 @@ await fetch({
* 2. PUT request
*
*/
await fetch({
await fetcher({
url: "https://api.example.com/post",
method: "PUT",
headers: {
Expand All @@ -120,7 +120,7 @@ await fetch({
* 3. PATCH request
*
*/
await fetch({
await fetcher({
url: "https://api.example.com/post/1",
method: "PATCH",
headers: {
Expand All @@ -135,12 +135,12 @@ await fetch({
* 4. Delete request
*
*/
await fetch({ url: "https://api.example.com/post/1", method: "DELETE" });
await fetcher({ url: "https://api.example.com/post/1", method: "DELETE" });
```

## Configuration

When initializing `SimpleFetch`, you can pass the following options:
When initializing `Fetchfully`, you can pass the following options:

### Base options

Expand Down Expand Up @@ -185,4 +185,4 @@ const fetch await fetcher({

## License

This project is licensed under the MIT License... for now!
This project is licensed under the MIT License.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "simple-fetcher",
"name": "fetchfully",
"version": "1.0.0",
"description": "Object-first and promise based Fetch API wrapper for convenient HTTP requests. Only specify what you need!",
"main": "./dist/simple-fetcher.cjs",
"module": "./dist/simple-fetcher.mjs",
"main": "./dist/fetchfully.cjs",
"module": "./dist/fetchfully.mjs",
"types": "./dist/index.d.ts",
"type": "module",
"exports": {
".": {
"import": "./dist/simple-fetcher.mjs",
"require": "./dist/simple-fetcher.cjs",
"import": "./dist/fetchfully.mjs",
"require": "./dist/fetchfully.cjs",
"types": "./dist/index.d.ts"
}
},
Expand All @@ -23,14 +23,14 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/romeopeter/simple-fetcher.git"
"url": "git+https://github.com/romeopeter/fetchfully.git"
},
"author": "Romeo Agbor Peter",
"license": "ISC",
"bugs": {
"url": "https://github.com/romeopeter/simple-fetcher/issues"
"url": "https://github.com/romeopeter/fetchfully/issues"
},
"homepage": "https://github.com/romeopeter/simple-fetcher#readme",
"homepage": "https://github.com/romeopeter/fetchfully#readme",
"devDependencies": {
"@types/node": "^22.10.2",
"tslib": "^2.7.0",
Expand Down

0 comments on commit 671812a

Please sign in to comment.