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

17 lines (16 loc) 567 B
"use strict"; import { GetPrinterStatusMessageMapping, PrinterStatusMapping } from "../../constants/index.js"; export function parsePrinterStatus(response) { return Object.keys(response).reduce((acc, propName) => { const statusCode = response[propName]; const message = GetPrinterStatusMessageMapping[propName][statusCode]; const status = PrinterStatusMapping[propName][statusCode]; acc[propName] = { status, message, statusCode: Number(statusCode) }; return acc; }, {}); } //# sourceMappingURL=parsePrinterStatus.js.map