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

@thiskyhan/bark.js

v3.1.0

Published

A simple JavaScript library for Bark.

Readme

bark.js

Bark.js Logo

Bark.js is a simple JavaScript library for sending custom notifications to your iPhone using the Bark iOS App.


Table of Contents

Features

  • Send custom push notifications with various options
  • Easy to use and integrate

Installation

npm install @thiskyhan/bark.js

Usage

import { BarkClient, BarkPushPayload } from 'bark.js';

// Configure the Bark client
const options = {
  baseUrl: 'https://your-bark-server.com', // You can also http://api.day.app as the base URL for the official Bark server
  key: 'your-device-key'
};

const client = new BarkClient(options);

// Create a notification payload
const payload = {
  body: 'Hello, this is a test notification!',
  title: 'Test Notification',
  icon: 'https://example.com/icon.jpg',
  url: 'https://example.com'
};

// Send the notification
client.pushMessage(payload).then(response => {
  console.log('Notification sent successfully:', response);
}).catch(error => {
  console.error('Failed to send notification:', error);
});

API

BarkClient

constructor(options: BarkOptions)

Creates an instance of BarkClient.

  • options (BarkOptions): Configuration options for the client.
    • baseUrl (string): Bark server base URL.
    • key (string): Device key for authentication.

pushMessage(payload: BarkPushPayload): Promise<BarkResponse>

Sends a push notification via the Bark API.

  • payload (BarkPushPayload): The notification payload to send.
    • body (string): Content of the push notification (required).
    • title (string): Title of the push notification (optional).
    • icon (string): Icon URL for the notification (optional, must be a JPG image).
    • url (string): URL to open when the notification is clicked (optional, must be a valid URL).
    • Other optional fields as defined in the BarkPushPayload interface.

Contributing

We welcome contributions from the community! If you'd like to contribute to the project, please follow these guidelines:

  1. Fork the repository and clone it locally.
  2. Create a new branch for your feature or bug fix.
  3. Make your changes and ensure the code passes any existing tests.
  4. Commit your changes with descriptive commit messages that follow the Conventional Commits standard.
  5. Push your changes to your fork and submit a pull request to the main branch of the original repository.

Please make sure to follow the Code of Conduct and Contributing Guidelines when contributing to this project.

Help

If you encounter any issues with the Lantern or have any questions, feel free to open an issue on this repository. We'll do our best to assist you!

License

This project is licensed under The GNU General Public License v3.0.

Acknowledgements

  • Bark - The iOS App for push notifications