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

21 lines (20 loc) 809 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.parsePrinterSettings = parsePrinterSettings; var _index = require("../../constants/index.js"); function parsePrinterSettings(response) { let valueMapping = _index.GetPrinterSettingsPaperWidthValuesMapping; if (response.type === _index.PrinterGetSettingsType.PRINTER_SETTING_PRINTDENSITY) { valueMapping = _index.GetPrinterSettingsPrintDencityValuesMapping; } else if (response.type === _index.PrinterGetSettingsType.PRINTER_SETTING_PRINTSPEED) { valueMapping = _index.GetPrinterSettingsPrintSpeendValuesMapping; } return { typeCode: response.type, type: _index.PrinterGetSettingsType[response.type], value: valueMapping[response.value] }; } //# sourceMappingURL=parsePrinterSettings.js.map