npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

escpos-browser

v0.1.1

Published

Zero-dependency JavaScript library for direct Epson ePOS printing from modern web browsers over HTTPS.

Readme

escpos-browser

Unofficial, zero-dependency JavaScript library for direct Epson ePOS Print communication from modern web browsers.

It connects straight from the web page to a compatible Epson printer over HTTPS. No print dialog, browser extension, Node.js service, Epson SDK file, or cloud relay is required.

This project is not affiliated with or endorsed by Seiko Epson Corporation. Epson and ePOS are trademarks of their respective owner.

Requirements

  • An Epson printer compatible with ePOS Print.
  • ePOS Print and HTTPS enabled on the printer.
  • A certificate trusted by every client device.
  • CORS enabled by the printer firmware.
  • The web app and printer must be mutually reachable on the network.

Quick start

<script src="https://your-app.example/js/escpos.js"></script>
<script>
  const printer = Escpos.create({
    host: "192.168.1.100",
    deviceId: "local_printer"
  });

  async function printReceipt() {
    const result = await printer.print(ticket => ticket
      .center("MY STORE", { bold: true, width: 2, height: 2 })
      .line()
      .row("Coffee x 2", "$10.00")
      .row("TOTAL", "$10.00", { bold: true })
      .qr("https://example.com")
      .feed(3)
      .cut()
    );
    console.log(result);
  }
</script>

The library exposes the global Escpos object. See API.md for the full command list, images, barcodes, page mode, drawer control, errors, and Epson-compatible method names.

Testing

Run the automated command-serialization tests with npm test. For hardware validation, serve the repository over HTTP/HTTPS and open examples/command-tests.html. It provides an individual physical test for every printer command; effectful tests are highlighted in orange.

Distribution

Copy dist/escpos.js into your application and include it with a regular <script> tag. The file is self-contained and has no runtime dependencies.

Security notes

  • Prefer a stable printer hostname or reserved IP address.
  • Never disable TLS certificate verification in production.
  • Trust only the certificate or issuing CA that belongs to the managed printer.
  • Network access policies in modern browsers may vary according to the origin and deployment environment; test using the same browser and network as the production POS.
  • Restrict printer network access to trusted POS clients.

Scope

Version 0.1.0 targets the Epson ePOS Print service. It does not implement Epson customer displays, scanners, keyboards, cash changers, or generic RAW TCP port 9100 printing from a browser.

License

MIT