UNPKG

node-uci

Version:

Universal Chess Interface protocol implementation for node.js

19 lines (16 loc) 291 B
import { Engine } from '../' export async function syncify(fn) { try { const result = await fn() return () => result } catch (e) { return () => { throw e } } } export function engineInit(cpMock) { const p = new Engine('').init() cpMock.uciok() return p }