label-printer 0.7.4 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -839,6 +839,11 @@ declare abstract class Printer {
|
|
|
839
839
|
* @param command Command to send to the usb
|
|
840
840
|
*/
|
|
841
841
|
writeCommand(command: Command): Promise<void>;
|
|
842
|
+
/**
|
|
843
|
+
* Writes a raw string to the printer
|
|
844
|
+
* @param text String to send to the printer
|
|
845
|
+
*/
|
|
846
|
+
writeRawString(text: string): Promise<void>;
|
|
842
847
|
/**
|
|
843
848
|
* Check if the device is indeed a printer
|
|
844
849
|
* @param device
|
package/dist/index.d.ts
CHANGED
|
@@ -839,6 +839,11 @@ declare abstract class Printer {
|
|
|
839
839
|
* @param command Command to send to the usb
|
|
840
840
|
*/
|
|
841
841
|
writeCommand(command: Command): Promise<void>;
|
|
842
|
+
/**
|
|
843
|
+
* Writes a raw string to the printer
|
|
844
|
+
* @param text String to send to the printer
|
|
845
|
+
*/
|
|
846
|
+
writeRawString(text: string): Promise<void>;
|
|
842
847
|
/**
|
|
843
848
|
* Check if the device is indeed a printer
|
|
844
849
|
* @param device
|
package/dist/index.js
CHANGED
|
@@ -1373,6 +1373,16 @@ var Printer = class {
|
|
|
1373
1373
|
yield command.writeTo(this.device);
|
|
1374
1374
|
});
|
|
1375
1375
|
}
|
|
1376
|
+
/**
|
|
1377
|
+
* Writes a raw string to the printer
|
|
1378
|
+
* @param text String to send to the printer
|
|
1379
|
+
*/
|
|
1380
|
+
writeRawString(text) {
|
|
1381
|
+
return __async(this, null, function* () {
|
|
1382
|
+
if (!this.device.opened) yield this.device.openAndConfigure();
|
|
1383
|
+
yield this.device.writeString(text);
|
|
1384
|
+
});
|
|
1385
|
+
}
|
|
1376
1386
|
/**
|
|
1377
1387
|
* Check if the device is indeed a printer
|
|
1378
1388
|
* @param device
|