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

serbest-zebra-printer-module

v0.1.0

Published

Zebra printera Bluetooth aracılığıyla bağlanıp etiket yazdıran React Native kütüphanesi.

Readme

serbest-zebra-printer-module

Zebra Link-OS yazıcılarla Bluetooth üzerinden iletişim kurup ZPL komutlarıyla etiket bastırmayı sağlayan React Native (Turbo Module) kütüphanesi.

Sadece Android desteklenir. iOS tarafı şu an implemente edilmemiştir.

Kurulum

npm install serbest-zebra-printer-module
# veya
yarn add serbest-zebra-printer-module

Gerekli Kurulum Adımları (ÖNEMLİ)

Kütüphaneyi kurduktan sonra, projenizde aşağıdaki iki adımı mutlaka tamamlamanız gerekir. Bunlar olmadan bağlantı Connect Error hatası verir.

1. Android İzinlerini Ekleyin

android/app/src/main/AndroidManifest.xml dosyanızın <manifest> etiketi içine şu izinleri ekleyin:

<uses-permission android:name="android.permission.BLUETOOTH_SCAN" android:usesPermissionFlags="neverForLocation" />
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />

Android 12 (SDK 31) altındaki cihazları da destekleyecekseniz ayrıca:

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

2. Çalışma Zamanı İzinlerini İsteyin

Manifest'te tanımlamak yeterli değildir — Android 12+'ta kullanıcıdan çalışma zamanında da izin istemeniz gerekir. connect() çağırmadan önce:

import { PermissionsAndroid, Platform } from 'react-native';

async function requestBluetoothPermissions(): Promise<boolean> {
  if (Platform.OS === 'android' && Platform.Version >= 31) {
    const results = await PermissionsAndroid.requestMultiple([
      PermissionsAndroid.PERMISSIONS.BLUETOOTH_SCAN,
      PermissionsAndroid.PERMISSIONS.BLUETOOTH_CONNECT,
    ]);
    return Object.values(results).every(
      (r) => r === PermissionsAndroid.RESULTS.GRANTED
    );
  }
  return true;
}

Kullanım

import { connect, print, disconnect, checkStatus } from 'serbest-zebra-printer-module';

// Yazıcının Bluetooth MAC adresi - KENDİ YAZICINIZIN adresiyle değiştirin.
// Telefonun Bluetooth ayarlarından eşleştirilmiş cihazlar listesinden bulabilirsiniz.
const PRINTER_MAC = 'XX:XX:XX:XX:XX:XX'; // <-- Bunu değiştirmeyi unutmayın!

await connect(PRINTER_MAC);

const zpl = '^XA^FO50,50^A0N,50,50^FDMerhaba^FS^XZ';
await print(zpl);

await disconnect();

Not: PRINTER_MAC değeri her yazıcıda farklıdır. Kodu kendi projenize entegre ederken bu değeri mutlaka kendi yazıcınızın gerçek MAC adresiyle değiştirin, aksi halde bağlantı kurulamaz.

Not: Jar dosyasını indirmeyi unutmayın.

API

| Fonksiyon | Açıklama | Dönüş | |---|---|---| | discoverPrinters() | Eşleştirilmiş ve yakındaki Bluetooth cihazlarını tarar, sonuçlar PrinterFound event'i ile gelir | Promise<void> | | connect(macAddress: string) | Belirtilen MAC adresindeki yazıcıya bağlanır | Promise<boolean> | | print(data: string) | Ham ZPL verisini yazıcıya gönderir | Promise<number> (yazılan byte sayısı) | | checkStatus() | Yazıcının anlık durumunu döner (READY, BUSY, DISCONNECTED vb.) | Promise<PrinterStatusResult> | | disconnect() | Bağlantıyı keser | Promise<boolean> |

Lisans

MIT