UNPKG

fetchbee

Version:

A lightweight JS library to simplify all kinds of API calls.

11 lines (8 loc) 307 B
import { postFetchWithMethod } from "./helpers/postHelper.js"; async function patchFetch(url, body, options = {}) { if (!url || typeof url !== "string") { console.warn("patchFetch: URL is missing or invalid."); return null; } return postFetchWithMethod("PATCH", url, body || {}, options); }