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

@orders.co/epson-tm-epos-sdk

v0.1.4

Published

React Native SDK for Epson ePOS-Print TM printers

Readme

@orders.co/epson-tm-epos-sdk

A React Native wrapper for the Epson ePOS-Print SDK, allowing you to interact with Epson TM series POS printers from your React Native applications.

Installation

npm install @orders.co/epson-tm-epos-sdk --save
# or
yarn add @orders.co/epson-tm-epos-sdk

Android Setup

  1. Add the following to your android/settings.gradle:
include ':epson-tm-epos-sdk'
project(':epson-tm-epos-sdk').projectDir = new File(rootProject.projectDir, '../node_modules/@orders.co/epson-tm-epos-sdk/android')
  1. Add the implementation to your android/app/build.gradle dependencies:
dependencies {
    // ...
    implementation project(':epson-tm-epos-sdk')
}
  1. Import and add the package to your MainApplication.java:
import com.reactnative.eposprint.EposPrintPackage;

// ...

@Override
protected List<ReactPackage> getPackages() {
    return Arrays.asList(
        new MainReactPackage(),
        new EposPrintPackage() // <-- Add this line
    );
}
  1. Add permissions to your AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

Usage

import EposPrintSdk, {
  DEVTYPE_TCP,
  LANG_EN,
  ALIGN_CENTER,
  FONT_A,
  CUT_FEED
} from '@orders.co/epson-tm-epos-sdk';

// Initialize the SDK
await EposPrintSdk.initialize();

// Connect to the printer
await EposPrintSdk.openPrinter({
  deviceType: DEVTYPE_TCP,
  target: '192.168.192.168', // IP address or Bluetooth MAC address
  printerModel: 'TM-m30',
  printerLanguage: LANG_EN,
  isStatusMonitor: true,
  interval: 3000
});

// Create and initialize a builder
const builder = EposPrintSdk.createBuilder();
await builder.initialize();

// Add commands to the builder
await builder.addTextAlign(ALIGN_CENTER);
await builder.addTextFont(FONT_A);
await builder.addTextSize(2, 2);
await builder.addText('Hello, ePOS Print!\n');
await builder.addFeedLine(1);
await builder.addTextSize(1, 1);
await builder.addText('This is a test receipt\n');
await builder.addFeedLine(1);
await builder.addCut(CUT_FEED);

// Send the print job to the printer
try {
  const result = await EposPrintSdk.sendData();
  console.log('Print success', result);
} catch (error) {
  console.error('Print error', error);
}

// Close the printer connection when done
await EposPrintSdk.closePrinter();

// Listen for printer status changes
const statusSubscription = EposPrintSdk.addStatusListener((event) => {
  console.log('Printer status changed:', event);
});

// Remove listener when component unmounts
EposPrintSdk.removeStatusListener(statusSubscription);

Supported Printer Models

  • TM-m30
  • TM-m30II
  • TM-m30II-H
  • TM-m30II-NT
  • TM-m30III
  • TM-m30III-H
  • TM-m50
  • TM-T20
  • TM-T20II
  • TM-T20III
  • TM-T20IIIL
  • TM-T70
  • TM-T70II
  • TM-T82
  • TM-T82II
  • TM-T82III
  • TM-T82X
  • TM-T83II
  • TM-T83III
  • TM-T88V
  • TM-T88VI
  • TM-T88VII
  • TM-U220
  • TM-U330

API Reference

EposPrintSdk

Static methods:

  • initialize(): Initialize the SDK
  • openPrinter(config): Connect to a printer
  • closePrinter(): Disconnect from the printer
  • getPrinterStatus(): Get current printer status
  • sendData(): Send print commands to the printer
  • createBuilder(): Create a new print command builder
  • addStatusListener(callback): Listen for printer status changes
  • addBatteryStatusListener(callback): Listen for battery status changes
  • removeStatusListener(subscription): Remove a status listener
  • removeBatteryStatusListener(subscription): Remove a battery status listener

Builder Class

Methods for building print commands:

  • initialize(): Initialize the builder
  • clear(): Clear all commands
  • addText(text): Add text to print
  • addTextAlign(align): Set text alignment
  • addTextSize(width, height): Set text size
  • addTextFont(font): Set text font
  • addTextSmooth(smooth): Enable/disable text smoothing
  • addFeed(): Add paper feed
  • addFeedLine(line): Add line feed
  • addCut(cutType): Add paper cut command
  • addBarcode(data, symbology, height, width, hri): Add barcode
  • addSymbol(data, type, level, width, height): Add 2D code
  • addImage(base64Image, x, y, width, height): Add image
  • beginPageMode(x, y, width, height, direction): Begin page mode
  • endPageMode(): End page mode

Development

Publishing New Versions

To publish a new version of the package:

# Use the automated publish script
npm run publish

This script will:

  1. Check if you're logged in to npm
  2. Prompt you to select a version bump type (patch, minor, major, or custom)
  3. Bump the version in package.json
  4. Build the package
  5. Publish to npm with public access
  6. Create a git tag and offer to push changes

Manual Version Bumping

You can also use npm scripts to bump the version:

# Bump patch version (0.1.0 -> 0.1.1)
npm run version:patch

# Bump minor version (0.1.0 -> 0.2.0)
npm run version:minor

# Bump major version (0.1.0 -> 1.0.0)
npm run version:major

# Test build the package
npm run build

License

MIT