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

@logfrog/client

v0.1.0

Published

LogFrog browser widget loader — analytics, session replay, changelog, feedback, support chat and feature flags for any web app, with full TypeScript types.

Readme

@logfrog/client

Typed browser SDK for LogFrog. Loads the LogFrog widget — analytics, session replay, product updates, feedback, feature flags and support chat — from an npm install instead of a hand-added <script> tag, with full TypeScript types and SSR safety.

This package doesn't bundle the widget; it injects the hosted script (https://api.logfrog.io/widget.js) so you always run the latest version, and gives you a typed facade over it. Calls made before the script finishes loading are queued and replayed on load.

Install

npm install @logfrog/client

Usage

import { logfrog } from "@logfrog/client";

logfrog.init({
  company: "YOUR_COMPANY_ID", // from the dashboard Install page
  features: {
    analytics: true,
    record: { sampleRate: 0.1 }, // session replay (also enable it in project settings)
    updates: true,
  },
});

// Attach the signed-in user (safe to call before or after init):
logfrog.identify({ user_id: "user_123", name: "Ada Lovelace", email: "[email protected]" });

// Custom analytics events:
logfrog.track("checkout_started", { plan: "pro" });

Individual functions are also exported if you prefer named imports:

import { init, identify, track, flag } from "@logfrog/client";

React

Initialize once, in your root component:

import { useEffect } from "react";
import { logfrog } from "@logfrog/client";

export function App() {
  useEffect(() => {
    logfrog.init({ company: "YOUR_COMPANY_ID", features: { analytics: true } });
  }, []);
  // …
}

init is idempotent and a no-op during server-side rendering, so it's safe in effects and frameworks like Next.js.

API

| method | description | | --- | --- | | init(options) | Load the widget and apply config. Idempotent; SSR-safe. | | whenReady() | Promise<void> that resolves once the widget script is live. | | identify(options) | Attach the signed-in user ({ user_id, name?, email?, traits? }). | | track(event, props?) | Record a custom analytics event. | | setTheme(theme) | "light" \| "dark" \| "system". | | open(id?) / openChat() | Open the updates widget / support chat. | | flag(key, fallback?) | Read a feature flag (returns fallback until flags load). | | flags() | Snapshot of all evaluated flags. | | onFlags(cb) | Subscribe to flag updates. | | refreshFlags() | Force a re-evaluation (e.g. after identify). | | stopRecording() | Opt this page out of session recording. | | isRecording() | Whether replay is actively capturing. | | stripeMetadata(extra?) | Metadata to attach to a Stripe Checkout session so revenue links to the visitor. | | reset() | Clear the stored visitor identity (e.g. on logout). |

init options

| option | type | description | | --- | --- | --- | | company | string (required) | Project company id from the dashboard. | | features | object | { updates?, feedback?, suggestions?, support?, analytics?, record? }. All opt-in. | | theme | "light" \| "dark" \| "system" | Widget theme. | | position | "bottom-left" \| "bottom-right" | Launcher position. | | apiOrigin | string | Override the API origin (default https://api.logfrog.io). | | scriptUrl | string | Override the loader script URL. | | nonce | string | CSP nonce applied to the injected <script>. |

Privacy (session replay)

Recording is opt-in and must be enabled in your project settings. Inputs are masked by default; add .lf-mask to mask an element's text, or .lf-block / data-lf-block to exclude an element entirely. Do-Not-Track is respected.

License

MIT