scrabble-solver
Version:
Scrabble Solver 2 - Free, open-source, cross-platform, multi-language analysis tool for Scrabble, Scrabble Duel, Super Scrabble, Letter League, Crossplay, Literaki, and Kelimelik. Quickly find the top-scoring words using the given board and tiles.
10 lines (7 loc) • 320 B
text/typescript
import { fetch } from './fetch';
export const fetchJson = async <T>(input: RequestInfo | URL, init?: RequestInit): Promise<T> => {
const headers = new Headers(init?.headers);
headers.set('Content-Type', 'application/json');
const response = await fetch(input, { ...init, headers });
return response.json();
};