A pure JavaScript thermal printer parser