Skip to content

caiotarifa/fetchja

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fetchja

Welcome to Fetchja, the ultimate JavaScript library designed to make your JSON:API interactions seamless and intuitive. Inspired by the renowned Kitsu library, Fetchja leverages the native Fetch API, ensuring a lightweight and efficient experience.

Why Fetchja?

  • ⚡️ Lightweight and Fast: Built on the native Fetch API, Fetchja ensures minimal overhead and maximum performance.
  • 🎨 Intuitive Design: Easy-to-understand methods and configurations make Fetchja accessible for developers of all levels.
  • 💪 Flexible and Customizable: Tailor Fetchja to your needs with customizable headers, query parameters, and resource cases.

Installation

To get started with Fetchja, simply install it via npm along with the pluralize library:

$ npm install fetchja pluralize

Getting Started

Here's a quick example to get you up and running with Fetchja:

import Fetchja from 'fetchja'

const api = new Fetchja({
  baseURL: 'https://api.example.com'
});

try {
  const response = await api.get('/posts')
  console.log(response)
} catch (error) {
  console.error(error)
}

Using a custom fetch function.

const api = new Fetchja({
  baseURL: 'https://api.example.com',
  fetchFunction: (url, options) => myCustomFetch(url.href, options)
})

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published