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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@loupedeck/web

v1.1.1

Published

![Node CI](https://github.com/Julusian/node-loupedeck/workflows/Node%20CI/badge.svg)

Downloads

2

Readme

@loupedeck/node

Node CI

npm version license

@loupedeck is a collection of libraries for interfacing with the various models of the Loupedeck.

Intended use

This library has nothing to do with the official loupedeck software. There is nothing here to install and run. This is a library to help developers make alternatives to that software

Device Support

  • [x] Loupedeck CT
  • [x] Loupedeck Live (firmware v0.2)
  • [x] Loupedeck Live S
  • [x] Razer Stream controller
  • [x] Razer Stream controller X

Install

$ npm install --save @loupedeck/node

Native dependencies

All of this library's native dependencies ship with prebuilt binaries, so having a full compiler toolchain should not be necessary to install @loupedeck/node.

API

The root methods exposed by the library are as follows. For more information it is recommended to rely on the typescript typings for hints or to browse through the source to see what methods are available

/**
 * Scan for and list detected devices
 */
export function listLoupedecks(): Promise<LoupedeckDeviceInfo[]>

/**
 * Open a loupedeck
 * @param path The path of the device to open
 * @param options Options to customise the device behvaiour
 */
export async function openLoupedeck(path: string, options?: LoupedeckDeviceOptions): Promise<LoupedeckDevice>

The Loupedeck type can be found here

Example

import { listLoupedecks, openLoupedeck } from '@loupedeck/node'

const loupedecks = await listLoupedecks()
const myLoupedeck = await openStreamDeck(loupedecks[0].path)

myLoupedeck.on('down', (info) => {
	console.log('control down', info)
})

myLoupedeck.on('up', (info) => {
	console.log('control up', info)
})

myLoupedeck.on('rotate', (info, delta) => {
	console.log('control rotate', info, delta)
})

// Fired whenever an error is detected by the device.
// Always add a listener for this event! If you don't, your application may crash if an error is reported.
myLoupedeck.on('error', (error) => {
	console.error(error)
})

// Fill the first button form the left in the first row with a solid red color. This is asynchronous.
const red = { red: 255, green: 0, blue: 0 }
await myLoupedeck.drawSolidColour('center', red, 90, 90, 0, 0)
console.log('Successfully wrote a red square to the center display.')

Some more complex demos can be found in the examples folder.

Contributing

The @loupedeck team enthusiastically welcomes contributions and project participation! There's a bunch of things you can do if you want to contribute! Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear.

Please refer to the Changelog for project history details, too.