UNPKG

react-native-esc-pos-printer

Version:

An unofficial React Native library for printing on an EPSON TM printer with the Epson ePOS SDK for iOS and Epson ePOS SDK for Android

15 lines (14 loc) 350 B
"use strict"; export async function tryToConnectUntil(printer, predicate) { async function connect() { try { await printer.connect(1500); } catch (error) {} const status = await printer.getStatus(); if (!predicate(status)) { await connect(); } } return connect(); } //# sourceMappingURL=tryToConnectUntil.js.map