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

@cap-kit/test-plugin

v1.0.3

Published

Architectural reference and boilerplate for Cap-Kit plugins.

Readme

Install

pnpm add @cap-kit/test-plugin
npx cap sync

Configuration

Configuration options for the Test plugin.

| Prop | Type | Description | Default | Since | | -------------------- | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- | ----- | | customMessage | string | Custom message appended to the echoed value. This option exists mainly as an example showing how to pass static configuration data from JavaScript to native platforms. | " (from config)" | 0.0.1 | | verboseLogging | boolean | Enables verbose native logging. When enabled, additional debug information is printed to the native console (Logcat on Android, Xcode on iOS). This option affects native logging behavior only and has no impact on the JavaScript API. | false | 1.0.0 |

Examples

In capacitor.config.json:

{
  "plugins": {
    "Test": {
      "customMessage": " - Hello from Config!",
      "verboseLogging": true
    }
  }
}

In capacitor.config.ts:

/// <reference types="@cap-kit/test-plugin" />

import { CapacitorConfig } from '@capacitor/cli';

const config: CapacitorConfig = {
  plugins: {
    Test: {
      customMessage: ' - Hello from Config!',
      verboseLogging: true,
    },
  },
};

export default config;

API

Public JavaScript API for the Test Capacitor plugin.

This interface defines a stable, platform-agnostic API. All methods behave consistently across Android, iOS, and Web.

echo(...)

echo(options: EchoOptions) => Promise<EchoResult>

Echoes the provided value.

If the plugin is configured with a customMessage, that value will be appended to the returned string.

This method is primarily intended as an example demonstrating native ↔ JavaScript communication.

| Param | Type | Description | | ------------- | --------------------------------------------------- | ------------------------------------ | | options | EchoOptions | Object containing the value to echo. |

Returns: Promise<EchoResult>

Since: 0.0.1

Example

const { value } = await Test.echo({ value: 'Hello' });
console.log(value);

openAppSettings()

openAppSettings() => Promise<void>

Opens the operating system's application settings page.

This is typically used when a permission has been permanently denied and the user must enable it manually.

On Web, this method is not supported.

Since: 1.0.0


getPluginVersion()

getPluginVersion() => Promise<PluginVersionResult>

Returns the native plugin version.

The returned version corresponds to the native implementation bundled with the application.

Returns: Promise<PluginVersionResult>

Since: 0.0.1

Example

const { version } = await Test.getPluginVersion();

Interfaces

EchoResult

Result object returned by the echo method.

This object represents the resolved value of the echo operation after native processing has completed.

| Prop | Type | Description | | ----------- | ------------------- | ------------------------------------------------------------------------------------------------------------- | | value | string | The echoed string value. If a customMessage is configured, it will be appended to the original input value. |

EchoOptions

Options object for the echo method.

This object defines the input payload sent from JavaScript to the native plugin implementation.

| Prop | Type | Description | | ----------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | value | string | The string value to be echoed back by the plugin. This value is passed to the native layer and returned unchanged, optionally with a configuration-based suffix. |

PluginVersionResult

Result object returned by the getPluginVersion() method.

| Prop | Type | Description | | ------------- | ------------------- | --------------------------------- | | version | string | The native plugin version string. |

Contributing

Contributions are welcome! Please read the contributing guide before submitting a pull request.


Credits

This plugin is based on prior work from the Community and has been refactored and modernized for Capacitor v8 and Swift Package Manager compatibility.

Original inspiration:


License

MIT