UNPKG

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.

22 lines (17 loc) 477 B
import { type BoardJson, type Locale } from '@scrabble-solver/types'; import { fetchJson } from './fetchJson'; interface Payload { board: BoardJson; game: string; locale: Locale; } interface Response { invalidWords: string[]; validWords: string[]; } export const verify = async ({ board, game, locale }: Payload): Promise<Response> => { return fetchJson<Response>('/api/verify', { method: 'POST', body: JSON.stringify({ board, game, locale }), }); };