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

@obslysdk/bridge

v2.4.0

Published

A typed bridge/wrapper for the Obsly SDK when loaded via CDN or injected into a webview. Provides type safety and a convenient interface for the global `window.ObslySDK` instance.

Downloads

96

Readme

npm version

@obslysdk/bridge

Overview

The @obslysdk/bridge package provides a typed, convenient interface for interacting with the Obsly SDK when it has been loaded onto a web page globally (e.g., via a CDN script tag or injected into a WebView).

This library does not bundle the Obsly SDK itself. Its primary purpose is to act as a "bridge" that provides full TypeScript support and a familiar API for the window.ObslySDK instance that is already present on the page.

Who is this for?

This package is designed for developers who are in one of the following scenarios:

  1. Using the CDN: You are loading the Obsly SDK using a <script> tag in your HTML file from our CDN.
  2. Injected SDK: You are working in an environment (like a mobile WebView) where the Obsly SDK is injected into the page by a native application.
  3. Dynamic Loading: You want to dynamically load the SDK from a script and then interact with it using a typed API.

If you are using a bundler like Webpack or Vite and want to include the Obsly SDK directly in your application bundle, you should use the @obslysdk/browser package instead.

Installation

npm install @obslysdk/bridge

Usage

After installing the package, you can import the ObslySDK functions directly. The bridge will automatically connect to the window.ObslySDK object.

For a complete explanation of all available functions and their usage, please refer to the documentation in the @obslysdk/browser README. The functions and types provided by @obslysdk/bridge are identical to those in @obslysdk/browser.

Example: Using with a CDN Script

Here is an example of how to use this library when the main SDK is loaded from a CDN.

index.html

<!doctype html>
<html>
  <head>
    <title>My App</title>
    <!-- Load the core Obsly SDK from the CDN -->
    <script src="https://librarycdn.com/sdk/latest/browser.iife.js"></script>
    <!-- Load your application's bundled JavaScript -->
    <script src="./my-app.js" defer></script>
  </head>
  <body>
    <h1>Welcome to my application!</h1>
  </body>
</html>

my-app.ts (Your application code)

import { init, addTag, Performance } from '@obslysdk/bridge'

// Since the Obsly SDK is already loaded on the page (e.g., from a CDN script),
// this library acts as a typed bridge to the global `window.ObslySDK` object.

init({
  ObslyKey: 'YOUR_OBSLY_KEY',
  instanceURL: 'https://api.obsly.com'
}) // This will internally call `window.ObslySDK.init`

// All other functions work the same way. Import what you need and use it directly in your application.
// For example, to add a tag:
addTag([{ key: 'user_tier', value: 'premium' }], 'User Properties') // This will internally call `window.ObslySDK.addTag`

// You can start a transaction:
Performance.startTransaction('test-transaction', 'test-transaction-description') // This will internally call `window.ObslySDK.Performance.startTransaction`
// ... later in your code, you can end the transaction:
Performance.endTransaction('test-transaction', 'test-transaction-description') // This will call `window.ObslySDK.Performance.endTransaction`

Getting Help

For questions, feedback, or support, please email us at [email protected].