Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ombori/ga-thermal-printer

Package Overview
Dependencies
Maintainers
19
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ombori/ga-thermal-printer - npm Package Compare versions

Comparing version 2.57.0 to 2.57.1

8

dist/index.d.ts

@@ -0,6 +1,12 @@

import { types as PrinterTypes } from 'node-thermal-printer';
import ReactNativeAdapter from './adapters/ReactNativeAdapter';
import SocketAdapter from './adapters/SocketAdapter';
import { PrinterAdapter } from './adapters/PrinterAdapter';
export { PrinterTypes } from 'node-thermal-printer';
declare type PrinterConfig = {
adapter?: PrinterAdapter;
type?: PrinterTypes;
};
export declare const defaultAdapter: ReactNativeAdapter | SocketAdapter;
declare const createPrinter: (adapter?: PrinterAdapter) => {
declare const createPrinter: (options?: PrinterConfig) => {
/**

@@ -7,0 +13,0 @@ * Send printing buffer to printer

7

dist/index.js

@@ -11,7 +11,10 @@ "use strict";

const messages_1 = require("./utils/messages");
var node_thermal_printer_2 = require("node-thermal-printer");
Object.defineProperty(exports, "PrinterTypes", { enumerable: true, get: function () { return node_thermal_printer_2.PrinterTypes; } });
exports.defaultAdapter = window.ReactNativeWebView ?
new ReactNativeAdapter_1.default() : new SocketAdapter_1.default();
const createPrinter = (adapter = exports.defaultAdapter) => {
const createPrinter = (options) => {
const { adapter = exports.defaultAdapter, type = node_thermal_printer_1.types.EPSON, } = options !== null && options !== void 0 ? options : {};
const thermalPrinter = new node_thermal_printer_1.printer({
type: node_thermal_printer_1.types.EPSON,
type,
interface: '',

@@ -18,0 +21,0 @@ });

{
"name": "@ombori/ga-thermal-printer",
"version": "2.57.0",
"version": "2.57.1",
"main": "dist/index.js",

@@ -11,3 +11,3 @@ "license": "MIT",

"dependencies": {
"node-thermal-printer": "^4.1.2"
"node-thermal-printer": "^4.2.1"
},

@@ -20,4 +20,3 @@ "devDependencies": {

"typescript": "^3.9.5"
},
"gitHead": "3cc275b6d36ade53ce8357f51242c07c2b741870"
}
}

@@ -6,9 +6,20 @@ import { printer as ThermalPrinter, types as PrinterTypes } from 'node-thermal-printer';

import { enablePrinting, printText } from './utils/messages';
export { PrinterTypes } from 'node-thermal-printer';
type PrinterConfig = {
adapter?: PrinterAdapter;
type?: PrinterTypes;
};
export const defaultAdapter = window.ReactNativeWebView ?
new ReactNativeAdapter() : new SocketAdapter();
const createPrinter = (adapter: PrinterAdapter = defaultAdapter) => {
const createPrinter = (options?: PrinterConfig ) => {
const {
adapter = defaultAdapter,
type = PrinterTypes.EPSON,
} = options ?? {};
const thermalPrinter = new ThermalPrinter({
type: PrinterTypes.EPSON,
type,
interface: '',

@@ -15,0 +26,0 @@ });

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc