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

@billdog.io/core

v1.0.0-beta.1

Published

Platform-agnostic core for BillDog SDK

Readme

@billdog.io/core

Platform-agnostic core for BillDog SDK v1.0.0.

Overview

This package provides the core functionality for the BillDog SDK. It is designed to be platform-agnostic and is extended by platform-specific implementations (React Native, iOS, Android, Web, etc.).

Features

  • 🎯 Configuration Management - Centralized SDK configuration
  • 🌐 API Client - HTTP client for BillDog API
  • 💳 Paywall Management - Fetch and cache paywall configurations
  • 👤 Customer Management - Track customer info and entitlements
  • 🛒 Purchase Management - Platform-agnostic purchase handling (requires delegate)
  • 📦 Module System - Plugin architecture for optional features

Installation

npm install @billdog.io/core

Note: This package is typically not installed directly. Use platform-specific packages instead:

  • @billdog.io/react-native for React Native
  • @billdog.io/web for web applications
  • BillDog (CocoaPods) for iOS
  • com.billdog:core (Maven) for Android

Usage

Basic Configuration

import { BillDogCore } from '@billdog.io/core';

const sdk = new BillDogCore();

sdk.configure({
  apiKey: 'bd_live_...',
  environment: 'production',
  enableLogging: true,
});

Fetch Paywall

const paywall = await sdk.fetchPaywall('premium_offer');
if (paywall) {
  console.log('Paywall components:', paywall.components);
}

Customer Info

const customer = await sdk.getCustomerInfo('user-123');
if (customer) {
  console.log('Active subscriptions:', customer.activeSubscriptions);
}

// Check entitlement
const hasPremium = sdk.hasEntitlement('premium');

Track Events

await sdk.trackEvent('paywall_viewed', {
  paywallId: 'premium_offer',
  placement: 'onboarding',
});

Using Modules

import { BillDogCore } from '@billdog.io/core';
import { Analytics } from '@billdog.io/analytics';

const sdk = new BillDogCore();

sdk.configure({
  apiKey: 'bd_live_...',
  modules: [Analytics],
});

// Or register after configuration
sdk.use(Analytics);

Architecture

The core SDK is organized into managers:

  • ConfigManager - Handles configuration and module registration
  • ApiClient - Makes HTTP requests to BillDog API
  • PaywallManager - Fetches and caches paywall configurations
  • CustomerManager - Manages customer information
  • PurchaseManager - Handles purchases (requires platform-specific delegate)

Platform-Specific Implementations

Platform-specific SDKs extend the core and provide:

  1. Purchase delegate implementation (StoreKit, Google Play Billing, etc.)
  2. UI components for rendering paywalls
  3. Platform-specific storage (AsyncStorage, UserDefaults, SharedPreferences)
  4. Native module bridges (for React Native)

Size

  • Minified + Gzipped: ~45KB
  • Tree-shakeable: Yes

API Reference

See API Documentation for complete API reference.

License

MIT