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

twinkly-api

v0.2.1

Published

A simple nodejs client for connecting to twinkly lights

Readme

Twinkly API

Description

This is a simple client helper to enable simple interactions with Twinkly smart lights https://www.twinkly.com/.

Getting Started

const Twinkly = require('./twinkly-api.js');
const twinkly = new Twinkly('192.168.0.xxx');
twinkly.setMode('off');

Methods

Currently this client is very limited, please feel free to contribute to expand it.

setMode

Set the current mode of the LED lights

Parameters
  • Mode (String), this can be one of the following options
    • off - turns off lights
    • demo - starts predefined sequence of effects that are changed after few seconds
    • movie - plays predefined or uploaded effect
    • rt - receive effect in real time
Response
Returns a promise, with no data

setDeviceName

Changes the name of the current device

Parameters
  • Name (String), Desired device name. At most 32 characters.
Response
Returns a promise, with no data

resetDevice

Restart the current animation

Parameters
  • none.
Response

Returns a promise, with no data

generateFullFrame

Generate a full frame of a solid colour

Parameters
  • colour - object containing r,g,b parameters you wish to set between 0-244
  • lightCount - the total number of lights you wish to generate the frame for
Response
Returns an array containing the details of a single frame

newMovieUpload

Sends a new 'movie' to the device, and displays it

Parameters
  • movie - js object containing the configurate
    • delay - the number of milliseconds to wait between each frame
    • frames - array of frames
      • light - {r: 0-244, g: 0-244, b: 0-244}

Example: Alternate between all lights set to white, and each light being a different colour, with a pause of 1 second between each change

	var frames = [
		twinkly.generateFullFrame({r: 244, g:244, b: 244}, 3),
		[
			[{r: 244, g:0, b: 0}],
			[{r: 0, g:244, b: 0}],
			[{r: 0, g:0, b: 244}],
		]
	]
	
	twinkly.newMovieUpload({
		frames: frames,
		delay: 1000
	});
Response

Returns a promise, with no data