Shramkoweb/Portfolio

View on GitHub
lib/fetcher.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
export async function fetcher<JSON = unknown>(
  input: RequestInfo,
  init?: RequestInit,
): Promise<JSON> {
  const res = await fetch(input, init);
  return res.json();
}