tray icon indicating copy to clipboard operation
tray copied to clipboard

Wrap qz.printers.find host search into a promise

Open tresf opened this issue 5 years ago • 0 comments

Clients looking to leverage both local printers and direct IP printers are forced to write a promise wrapper when switching between known print-to-host (e.g. IP address: qz.configs.create({ host: '192.168.1.1, port: 9100}) and unknown printer names (qz.printers.find("my printer")).

Handling both scenarios could be gracefully handled if qz.printers.find simply returned the object provided to it if it were in { host: ..., port: ... } format. Thoughts?

tresf avatar Sep 09 '19 15:09 tresf