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

@encorekit/web-sdk

v0.1.15

Published

Encore SDK for web applications - display targeted offers and manage user entitlements

Readme

Encore Web SDK

A JavaScript/TypeScript SDK that enables web applications to display targeted offers to users, granting them provisional access to premium features when they complete advertiser offers.

Features

  • 🎯 Targeted Offer Presentation - Display offers at critical moments (cancellation flows, paywalls, onboarding)
  • 🔐 Entitlement Management - Two-tier system (provisional + verified) for instant UX and reliable billing
  • 📱 Framework Agnostic - Works with React, Vue, Angular, Svelte, vanilla JavaScript, or any web framework
  • 🎨 Responsive UI - Beautiful, accessible modal interface that works on desktop and mobile
  • 📦 Lightweight - < 50KB gzipped bundle size
  • 🔌 Offline Support - Queues signals and syncs when connectivity restored
  • Accessible - WCAG 2.1 Level AA compliant

Installation

npm install @encorekit/web-sdk

Or via CDN:

<script src="https://encorekit.com/encore.min.js"></script>

Quick Start

import Encore from '@encorekit/web-sdk';

// Configure the SDK
Encore.configure({
  apiKey: 'your-api-key-here',
  userId: 'your-user-uuid',
  environment: 'production'
});

// Identify the user after login (optional)
Encore.identify('user-123', {
  email: '[email protected]',
  subscriptionTier: 'free'
});

// Present an offer
const result = await Encore.presentOffer();
if (result.granted) {
  console.log('User granted entitlement:', result.entitlement);
  console.log('Offer granted:', result.entitlement);
  // Handle user completed Encore offer
} else {
  console.log('User declined:', result.reason);
}

// Check entitlement on YOUR server (not client-side)
// See: https://docs.encorekit.com/server-side-validation

Browser Support

  • Chrome/Edge (last 2 versions)
  • Firefox (last 2 versions)
  • Safari (last 2 versions)
  • iOS Safari 15+

iOS HTML Tag Integration

The simplest possible integration - just build a URL and open it in a WKWebView. No SDK, no dependencies, no complexity.

Quick Start (3 Lines of Code!)

// 1. Build URL
let url = EncoreURL.build(apiKey: "your_key", userId: "user_123")!

// 2. Create WebView and load it
let webView = WKWebView(frame: view.bounds)
view.addSubview(webView)
webView.load(URLRequest(url: url))

// That's it! 🎉

Complete Example

import UIKit
import WebKit

// Copy EncoreURLBuilder.swift to your project (one file!)
func showEncoreOffer() {
    let url = EncoreURL.build(
        apiKey: "pk_live_...",
        userId: currentUser.id,
        attributes: [
            "email": currentUser.email,
            "subscriptionTier": currentUser.tier
        ]
    )!
    
    let webView = WKWebView(frame: view.bounds)
    webView.backgroundColor = .clear
    view.addSubview(webView)
    webView.load(URLRequest(url: url))
}

SwiftUI Version

import SwiftUI

struct MyView: View {
    var body: some View {
        EncoreWebView(
            apiKey: "pk_live_...",
            userId: currentUser.id
        )
    }
}

What You Get

  • Zero dependencies - Just one Swift file
  • 3 lines of code - Build URL, create WebView, load
  • Auto-initialization - Embed handles everything
  • Full features - Offers, entitlements, tracking
  • Works everywhere - UIKit, SwiftUI, any iOS app

Documentation

Advanced: With Callbacks

Need callbacks when offers complete? Use the full bridge integration.

When to Use

| Feature | Simple (URL) | Native iOS SDK | |---------|-------------|------------| | Integration | 3 lines | ~50 lines | | Dependencies | None | Requires SPM | | Callbacks | No | Yes | | Works? | ✅ | ✅ |

Use simple integration for 99% of cases. Only need the full bridge if you require granular callbacks.

Documentation