Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

lineprinter

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lineprinter

Print to USB line printers from Node

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

lineprinter

Print to USB line printers from Node

Usage

const LinePrinter = require("lineprinter");
const printer = await LinePrinter.auto();

await printer.println("Hello, World!");

API

async LinePrinter.list()

Returns the list of printers currently connected.

await LinePrinter.list();
// [ "lp0" ]

async LinePrinter.connect(device)

Returns a new LinePrinter connected to the printer.

const printer = await LinePrinter.connect("lp0");

async LinePrinter.auto()

Returns a LinePrinter connected to the first printer found.

const printer = await LinePrinter.auto();

async LinePrinter#print(data)

Prints data to the printer. Can be a String or Buffer.

await printer.print("Hello");

async LinePrinter#println(data)

Prints data to the printer, followed by a line break.

await printer.println("Hello, World!");

FAQs

Package last updated on 27 Jul 2017

Did you know?

Socket

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.

Install

Related posts