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

forter-expo

v2.1.7

Published

Expo Module for the Forter Mobile SDK

Readme

forter-expo

Expo Module for the Forter Mobile SDK, supporting iOS and Android.

Requires Expo SDK 51+ (New Architecture only).

Installation

Step 1: Install the package

npm install forter-expo

Step 2: Add the config plugin

In your app.json (or app.config.js):

{
  "expo": {
    "plugins": ["forter-expo"]
  }
}

This automatically configures:

  • iOS: Adds Forter's private CocoaPods spec source to the Podfile
  • Android: Adds Forter's private Maven repository to the project

Step 3: Rebuild

npx expo prebuild --clean
npx expo run:ios
npx expo run:android

Usage

import {
  init,
  getForterToken,
  getDeviceUniqueID,
  setDevLogsEnabled,
  trackNavigation,
  trackAction,
  addForterTokenListener,
  ForterNavigationType,
  ForterActionType,
} from 'forter-expo';

// Enable dev logs (optional)
setDevLogsEnabled();

// Initialize the SDK
const deviceId = await getDeviceUniqueID();
await init('YOUR_SITE_ID', deviceId);

// Track navigation and actions
trackNavigation('mainpage', ForterNavigationType.PRODUCT);
trackAction(ForterActionType.ACCOUNT_LOGIN);

// Get the current Forter token
const token = await getForterToken();
console.log('Forter token:', token);

// Listen for token updates
const subscription = addForterTokenListener((token) => {
  console.log('Token updated:', token);
});

// Remove listener when done
subscription.remove();

API

Async methods

| Method | Returns | | ------------------------- | ----------------- | | init(siteId, mobileUid) | Promise<void> | | getForterToken() | Promise<string> | | getDeviceUniqueID() | Promise<string> |

Sync methods

| Method | Returns | | ------------------------------------------------------------------------------------------- | -------- | | getSDKVersionSignature() | string | | setAccountIdentifier(accountUid, accountType) | void | | trackNavigation(screenName, navigationType) | void | | trackNavigationWithExtraData(screenName, navigationType, itemId, itemCategory, otherInfo) | void | | trackAction(actionType) | void | | trackActionWithMessage(actionType, message) | void | | trackActionWithJSON(actionType, dictionary) | void | | trackCurrentLocation(longitude, latitude) | void | | setDevLogsEnabled() | void |

Events

| Method | Returns | | ---------------------------------- | -------------- | | addForterTokenListener(callback) | Subscription |

Enums

  • ForterNavigationType: PRODUCT, ACCOUNT, SEARCH, CHECKOUT, CART, HELP, APP
  • ForterActionType: TAP, CLIPBOARD, TYPING, ADD_TO_CART, REMOVE_FROM_CART, ACCEPTED_PROMOTION, ACCEPTED_TOS, ACCOUNT_LOGIN, ACCOUNT_LOGOUT, ACCOUNT_ID_ADDED, PAYMENT_INFO, SHARE, CONFIGURATION_UPDATE, APP_ACTIVE, APP_PAUSE, RATE, IS_JAILBROKEN, SEARCH_QUERY, REFERRER, WEBVIEW_TOKEN, OTHER
  • ForterAccountType: MERCHANT, FACEBOOK, GOOGLE, TWITTER, APPLE_IDFA, OTHER

Migration from v1.x

v2.0 is a breaking change — callbacks are replaced with Promises:

// Before (v1.x)
forterSDK.init(siteId, uid, successCb, errorCb);
forterSDK.getForterToken(successCb, errorCb);
forterSDK.getDeviceUniqueID(callback);
forterSDK.registerForterTokenListener(callback);

// After (v2.0)
await init(siteId, uid);
const token = await getForterToken();
const deviceId = await getDeviceUniqueID();
const subscription = addForterTokenListener(callback);

Manual native setup (Podfile sources, Maven repos, RNForterPackage registration) is no longer needed — the config plugin handles everything.