1.0.3-readme2 • Published 11 months ago

@smootie/fetch v1.0.3-readme2

Weekly downloads
-
License
ISC
Repository
github
Last release
11 months ago

@smootie/fetch

  • Faster fetch module.

Installation

  • We are recommend to use pnpm
pnpm i @smootie/fetch

Usage

  • We have 2 option to fetch.
// class

// in ESM
import { Request } from "@smootie/fetch";

// in CJS
const { Request } = require("@smootie/fetch");

const request = new Request();
await request.request("url", options);
await request.post(..., ...);
await request.put(..., ...);
await request.trace(..., ...);
await request.head(..., ...);
await request.delete(..., ...);
await request.patch(..., ...);

// function

// in ESM
import fetch from "@smootie/fetch";

// in CJS
const fetch = require("@smootie/fetch");

console.log(await fetch("url", options));
import { Request } from "@smootie/fetch";

const request = new Request<{ json: { "dist-tags": { latest: string }} }>("https://registry.npmjs.com/@smootie/fetch", options);
await request.request("url", options);
await request.post(..., ...);
await request.put(..., ...);
await request.trace(..., ...);
await request.head(..., ...);
await request.delete(..., ...);
await request.patch(..., ...);
1.0.3-readme2

11 months ago

1.0.3-readme

11 months ago

1.0.3

11 months ago

1.0.0

11 months ago