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 🙏

© 2025 – Pkg Stats / Ryan Hefner

z-network-scanner-plugin

v0.0.12

Published

Capacitor plugin to scan local network devices (IP, MAC, etc.)

Readme

Z Network Scanner Plugin

A custom Capacitor plugin for scanning the local Wi-Fi network and retrieving connected device information such as IP addresses, MAC addresses, and hostnames. Designed for the Smart-QR mobile app (Ionic + Angular 20 + Capacitor 7).

🚀 Features

  • Scan devices connected to the same Wi-Fi network
  • Retrieve IP Address, MAC Address, and Hostname
  • Works on Android with Capacitor 7
  • Simple Java + Capacitor plugin
  • Lightweight and fast network discovery
  • Can be integrated easily into any Ionic project

📦 Installation

This plugin is installed locally under:

smart-qr/plugins/z-network-scanner-plugin/

To rebuild and sync the plugin:

npm install
npx cap sync

If you made Java changes:

cd android
./gradlew clean
cd ..
npx cap sync android

📡 Usage (Ionic / Angular)

Import the plugin:

import { Plugins } from '@capacitor/core';
const { ZNetworkScanner } = Plugins;

▶️ Example: Scan Network

async scanNetwork() {
  const result = await ZNetworkScanner.scanNetwork();
  console.log('Scan Result:', result.devices);
}

📚 API Documentation

scanNetwork()

Scans the Wi-Fi network and returns a list of connected devices.

Returns:

{
  devices: {
    ip: string;
    mac: string;
    hostname?: string;
  }[];
}

getCurrentIP()

Returns the device’s current local IP address.

Returns:

{
  ip: string;
}

ping(ip: string)

Pings an IP address on the network.

Parameters:

  • ip: string — target IP

Returns:

{
  success: boolean;
  time?: number;
}

📱 Android Permissions

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />

If scanning ARP/MAC:

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

🛠 Development & Rebuild

After editing TypeScript:

npm run build
npx cap sync

After editing Java:

cd android
./gradlew clean
cd ..
npx cap sync android

🧪 Testing

ZNetworkScanner.scanNetwork().then(r => console.log(r));
ZNetworkScanner.getCurrentIP().then(r => console.log(r));

📜 License

Private – Zidan-Tech QR