
Security News
curl Shuts Down Bug Bounty Program After Flood of AI Slop Reports
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.
epson-tm-u220-driver
Advanced tools
Small node.js util to send commands to Epson U220* receipt printers
A TypeScript driver for the Epson TM-U220* receipt printers. Since it uses standard ESC/POS commands, it may work with other compatible printers as well. I only tested it with the TM-U220IID model.
For general ESC/POS printer usage, I recommend using the escpos package. This driver is intended for cases where you need a minimal, specialized solution specifically for TM-U220* series printers.
npm install epson-tm-u220iid-driver
import PrinterBuffer, { Alignment, TextSize } from 'epson-tm-u220iid-driver';
const printer = new PrinterBuffer({
portPath: '/dev/tty.usbserial', // Your serial port path
baudRate: 9600, // Optional, defaults to 9600
autoOpen: true // Optional, defaults to true
});
// Simple print job
await printer
.init()
.text('Hello World!')
.print();
// Formatted print job
await printer
.init()
.align(Alignment.CENTER)
.size(TextSize.DOUBLE_HEIGHT)
.text('Double height')
.align(Alignment.LEFT)
.init()
.text('Regular text')
.feed(3)
.print();
await printer.close(); // Close the port when done
The driver supports various text formatting options:
// Alignment
printer.align(Alignment.LEFT);
printer.align(Alignment.CENTER);
printer.align(Alignment.RIGHT);
// Text Size
printer.size(TextSize.NORMAL);
printer.size(TextSize.DOUBLE_HEIGHT);
printer.size(TextSize.DOUBLE_WIDTH);
printer.size(TextSize.DOUBLE_BOTH);
interface PrinterOptions {
portPath: string; // Path to the serial port
baudRate?: number; // Baud rate (default: 9600)
autoOpen?: boolean; // Auto-open port (default: true)
}
init(): Initialize the printertext(text: string): Add text to the bufferalign(alignment: Alignment): Set text alignmentsize(size: TextSize): Set text sizefeed(lines: number = 2): Feed paper linesclear(): Clear the print bufferprint(): Print the buffer contentsclose(): Close the serial portenum Alignment {
LEFT = '\x1B\x61\x00',
CENTER = '\x1B\x61\x01',
RIGHT = '\x1B\x61\x02'
}
enum TextSize {
NORMAL = '\x1B\x21\x00',
DOUBLE_HEIGHT = '\x1B\x21\x10',
DOUBLE_WIDTH = '\x1B\x21\x20',
DOUBLE_BOTH = '\x1B\x21\x30'
}
# Install dependencies
npm install
# Build the project
npm run build
# Run tests
npm test
FAQs
Small node.js util to send commands to Epson U220* receipt printers
The npm package epson-tm-u220-driver receives a total of 5 weekly downloads. As such, epson-tm-u220-driver popularity was classified as not popular.
We found that epson-tm-u220-driver demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A surge of AI-generated vulnerability reports has pushed open source maintainers to rethink bug bounties and tighten security disclosure processes.

Product
Scan results now load faster and remain consistent over time, with stable URLs and on-demand rescans for fresh security data.

Product
Socket's new Alert Details page is designed to surface more context, with a clearer layout, reachability dependency chains, and structured review.