UNPKG

node-thermal-printer

Version:

Print on Epson, Star, Tranca, Daruma, Brother and Custom thermal printers with Node.js

25 lines (20 loc) 556 B
const PrinterType = require('./printer-type'); class Daruma extends PrinterType { constructor () { super(); this.config = require('./daruma-config'); } // ------------------------------ Append ------------------------------ append (appendBuffer) { if (this.buffer) { this.buffer = Buffer.concat([this.buffer, appendBuffer]); } else { this.buffer = appendBuffer; } } // ------------------------------ Beep ------------------------------ beep () { return this.config.BEEP; } } module.exports = Daruma;