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

@deeplinx/sdk

v1.0.1

Published

Official JavaScript SDK for DeepLinx - Smart Deep Linking Platform

Readme

@deeplinx/sdk

Official JavaScript SDK for DeepLinx - Smart Deep Linking Platform.

Features

  • 🔗 Deferred Deep Linking - Capture context before app install
  • 📊 Event Tracking - Track custom events and conversions
  • 👤 User Identification - Link anonymous users to accounts
  • 🔒 Install Attribution - Track which links drive installs
  • 💾 Offline Support - Works without network connectivity
  • 📱 Cross-Platform - Works in browsers and React Native

Installation

npm install @deeplinx/sdk
# or
yarn add @deeplinx/sdk
# or
pnpm add @deeplinx/sdk

Quick Start

Initialize the SDK

import { DeepLinx } from '@deeplinx/sdk';

const deeplinx = new DeepLinx({
  apiKey: 'your-api-key',
  debug: true, // Enable console logging
});

// Initialize on page load
await deeplinx.init();

Deferred Deep Linking

When a user clicks your DeepLinx short link and doesn't have your app installed:

  1. They arrive on your landing page with ?_dl=short-slug parameter
  2. The SDK captures their device fingerprint
  3. After they install your app, call match() to retrieve the original context
// In your mobile app (React Native/Capacitor/etc.)
const context = await deeplinx.match();

if (context) {
  console.log('User came from:', context.slug);
  console.log('Original link:', context.longUrl);
  console.log('Custom data:', context.context);
  
  // Navigate to the intended content
  navigation.navigate(context.context.screen, context.context.params);
}

Track Events

// Track a simple event
deeplinx.track('button_click');

// Track with properties
deeplinx.track('purchase', {
  productId: 'sku-123',
  amount: 99.99,
  currency: 'USD',
});

// Track page views
deeplinx.track('page_view', {
  page: '/products/shoes',
  category: 'footwear',
});

Identify Users

// After user logs in
deeplinx.identify('user-123', {
  email: '[email protected]',
  name: 'John Doe',
  plan: 'premium',
  signupDate: '2024-01-15',
});

Get User Information

// Get current user ID (null if not identified)
const userId = deeplinx.getUserId();

// Get anonymous ID (always available)
const anonId = deeplinx.getAnonymousId();

// Get stored deferred context
const context = deeplinx.getDeferredContext();

Reset on Logout

// Clear all stored data when user logs out
deeplinx.reset();

Configuration Options

const deeplinx = new DeepLinx({
  // Required: Your API key
  apiKey: 'your-api-key',
  
  // Optional: Custom API endpoint (default: https://api.deeplinx.tech)
  baseUrl: 'https://your-custom-domain.com',
  
  // Optional: Enable debug logging (default: false)
  debug: true,
  
  // Optional: Custom storage adapter
  storage: customStorageAdapter,
});

TypeScript Support

Full TypeScript support with exported types:

import type {
  DeepLinxConfig,
  DeferredContext,
  TrackEventProperties,
  UserTraits,
  Fingerprint,
} from '@deeplinx/sdk';

// Use in your code
const config: DeepLinxConfig = {
  apiKey: 'your-api-key',
};

const handleContext = (context: DeferredContext | null) => {
  if (context) {
    // ...
  }
};

Custom Storage

For environments without localStorage (like React Native):

import { DeepLinx, MemoryStorageAdapter, StorageAdapter } from '@deeplinx/sdk';

// Use built-in memory adapter
const deeplinx = new DeepLinx({
  apiKey: 'your-api-key',
  storage: new MemoryStorageAdapter(),
});

// Or implement your own
class AsyncStorageAdapter implements StorageAdapter {
  getItem(key: string) {
    return AsyncStorage.getItem(key);
  }
  setItem(key: string, value: string) {
    AsyncStorage.setItem(key, value);
  }
  removeItem(key: string) {
    AsyncStorage.removeItem(key);
  }
}

UMD/Browser Usage

<script src="https://cdn.deeplinx.tech/sdk/1.0.0/index.umd.js"></script>
<script>
  const deeplinx = new DeepLinx.DeepLinx({
    apiKey: 'your-api-key',
  });
  
  deeplinx.init().then(() => {
    deeplinx.track('page_loaded');
  });
</script>

API Reference

DeepLinx(config)

Create a new SDK instance.

deeplinx.init(): Promise<void>

Initialize the SDK. Call on page load.

deeplinx.match(): Promise<DeferredContext | null>

Attempt to match the current device with a previous click.

deeplinx.track(event, properties?): Promise<void>

Track a custom event.

deeplinx.identify(userId, traits?): Promise<void>

Identify the current user.

deeplinx.getUserId(): string | null

Get the current user ID.

deeplinx.getAnonymousId(): string

Get the anonymous ID.

deeplinx.getDeferredContext(): DeferredContext | null

Get stored deferred context.

deeplinx.clearDeferredContext(): void

Clear stored deferred context.

deeplinx.reset(): void

Reset SDK state (use on logout).

License

MIT © DeepLinx