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

favor

v0.0.20

Published

A simple library for creating hardware-agnostic IoT applications in Javascript

Downloads

114

Readme

#Favor Favor Logo

bitHound Overall Score bitHound Dependencies bitHound Code

A simple library for creating hardware agnostic IoT devices.

Favor is a javascript/node.js library to abstract away complex and inconsistent hardware interfaces into a single simple to use API.

In a nutshell

Have you ever wanted to write

$$('temperature').get(function(temp) { console.log('The temperature is ', temp) };

Well, now you can, and run on multiple devices without mixing business logic with device configuration considerations.

Check out the demo video of getting started with Favor. demo hello world led video

What do you mean by Hardware agnostic

In this sense, hardware agnostic means that you can write your business logic without needing to worry about what hardware it will run on.

Currently Favor works with linux based devices like the Raspberry Pi, Beaglebone and others. But more than just the hardware platform, with Favor you can run your application on different chips and sensors, without needing to consider what type of chip the application is runnning on, or even what protocol (gpio, I2C, SPI).

Favor makes it possible to run your application on completely different hardware.

Other platforms are currently in the process of being supported, and more protocols can be added as well. Need something special? Just ask!

Supported Versions of node

Favor has been tested with node v4, it should also work with v5. v0.10 and v0.12 have not been tested and may not work.

What's supported?

Currently Favor has been tested on RaspberryPi v1b and Beaglebone Black, but any linux device which runs node.js should work. I'll be happy to test with other devices, I just need to get access to them.

Favor works with GPIO, i2C and SPI protocols.

How Does It Work?

Favor uses a js configuration file stored on your device which describes the structure of your hardware. It queries this js file, similar to how jQuery parses and interacts with the DOM. Once Favor knows what devices are connected, and how to interact with them, you can easly write jQuery style statements like $$('temperature').get(callback) will get you the temperature on any device running Favor which has a temperature sensor.

What are the benefits of Favor

  1. a single consistent api for interacting with different devices and protocols

  2. a separation of concerns between hardware and software

  3. write-once run-anywhere

  4. testable logic which will run across different hardware devices

Installing

npm install favor

See the favor wiki for more documentation

Favor Wiki

Live-code example of getting data from a temperature sensor

Get Temperature - live code

Live-code example of watching buttons and sensors

Watch Sensors - live code