@skyra/safe-fetch
TypeScript icon, indicating that this package has built-in type declarations

1.1.4 • Public • Published

@skyra/safe-fetch

A fetch wrapper on top of Rust's Result, powered by @sapphire/result.

Features

  • Powered by the native fetch function
  • CJS and ESM support

Usage

import { safeFetch, json } from '@skyra/safe-fetch';

const data = await json(safeFetch('https://api.example.org'));

console.log(data);

Package Sidebar

Install

npm i @skyra/safe-fetch

Weekly Downloads

370

Version

1.1.4

License

Apache-2.0

Unpacked Size

27.6 kB

Total Files

9

Last publish

Collaborators

  • favna
  • kyranet