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

@dada78641/strim-obstools

v0.0.2

Published

Higher level OBS operations using the websocket

Readme

TypeScript MIT license npm version

@dada78641/strim-obstools

This library wraps obs-websocket-js and provides a number of higher level operations.

The functionality provided by this library is specific to my personal OBS setup, and most of the functions don't work if the scenes aren't set up in a particular way.

Usage

Install via npm:

npm i @dada78641/strim-obstools

Basic usage is as follows:

import {ObsTools} from '@dada78641/strim-obstools'

const ot = new ObsTools({address: 'ws://obs.local:4455', password: 'my_password'})
ot.once('ready', async () => {
  // OBS is connected and ready to do stuff.
  const game = await ot.getActiveGame()
  // Direct access to the obs-websocket-js instance:
  const scenes = await ot.obs.call('GetSceneList')
})

The ready event is fired when OBS is ready to start handling requests (which might be some time after it successfully connects). See the ConnectionEvents type to find out which events get fired.

This library is designed to be used both on server and browser.

Tags

This library is based around the concept of "tags" in scene names and source names. Tags take on the following form:

  • A single tag: [[TestItem]]
  • A key-value tag: [[Game:StarCraft]]

This is used to find specific types of scenes and sources and do stuff with them (e.g. hide/unhide them).

Triggers

Triggers are a little hack. Very simply put, they're placeholder sources that, when hidden, fire a callback and then unhide themselves. The sources themselves are never seen—they're purely there for the callbacks.

A trigger either just sends a single signal (it's always visible; fires a callback when hidden, and then instantly unhides itself), or can be used as a binary toggle (it can be hidden or visible and fires a callback when toggled).

The reason triggers are used is because it's an easy way to send custom events without your tool needing to be websocket aware. For example, the Elgato Stream Deck can't send websocket events, but it can hide sources; so using triggers, the Stream Deck can be purposed to directly send events.

See also

License

MIT licensed.