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

bluetooth-heart-rate

v0.0.1

Published

A library to connect to Bluetooth Heart Rate sensors

Downloads

2

Readme

Bluetooth Heart Rate Library

A JavaScript library to connect to Bluetooth Heart Rate sensors. This library provides a simple API to connect to heart rate devices that support the standard Bluetooth Heart Rate Measurement characteristic.

Installation

You can install the bluetooth-heart-rate library using npm:

npm install bluetooth-heart-rate

Usage

Connect to a Device

First, you need to connect to a device using the connect function. This will prompt the user to select a device and return a promise that resolves when the connection is established.

import { connect } from 'bluetooth-heart-rate';

connect().then(() => {
  console.log('Connected to heart rate sensor.');
});

Start Heart Rate Measurement

Once connected, you can start receiving heart rate measurements using the startHeartRateMeasurement function. This function takes a callback that will be called with the heart rate value and an optional interval in seconds to throttle the updates.

import { startHeartRateMeasurement } from 'bluetooth-heart-rate';

startHeartRateMeasurement((heartRate) => {
  console.log(`Heart rate: ${heartRate}`);
}, 1); // updates every second

Stop Heart Rate Measurement

You can stop receiving heart rate updates using the stopHeartRateMeasurement function.

import { stopHeartRateMeasurement } from 'bluetooth-heart-rate';

stopHeartRateMeasurement();
console.log('Stopped heart rate measurement.');

We Develop with Github

We use Github to host code, to track issues and feature requests, as well as accept pull requests. You can contribute in many ways, and here are a few methods:

  1. Reporting Bugs: If you encounter any bugs or issues, please create a new issue in our Github repository. Provide as much detail as you can about the issue. Screenshots, code snippets, and detailed explanations are all helpful.

  2. Suggest Enhancements: If you have ideas for new features or improvements, we'd love to hear them! Please create a new issue and use the feature request template to share your ideas.

  3. Pull Requests: If you'd like to contribute code, the best way is by making a pull request. If you're new to Github, here is a tutorial on how to create a pull request. Before creating a pull request, please make sure your code follows our coding conventions and passes all tests.

In all cases, after your contribution is reviewed and approved, it will be incorporated into the project!

Any contributions you make will be under the MIT Software License

In short, when you submit code changes, your submissions are understood to be under the same MIT License that covers the project. Feel free to contact the maintainers if that's a concern.

Report bugs using Github's issues

We use GitHub issues to track public bugs. Report a bug by opening a new issue; it's that easy!

Write bug reports with detail, background, and sample code

Great Bug Reports tend to have:

  • A quick summary and/or background
  • Steps to reproduce
  • Be specific!
  • Give sample code if you can.
  • What you expect would be the right behavior?
  • Notes (possibly including why you think this might be happening, or things you tried that didn't work)

We hope you'll find these guidelines helpful. We're excited to see what you'll contribute!