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

np-application-insights-async-storage

v0.1.5

Published

Offline storage for application insights using AsyncStorage

Readme

np-application-insights-async-storage

BETA

Overview

This package is a small drop-in replacement for the built-in WebStorageProvider used by the Application Insights offline channel, but implemented on top of @react-native-async-storage/async-storage so it works in React Native environments where localStorage / sessionStorage are not available.

It mirrors the WebStorageProvider API and semantics from: https://github.com/microsoft/ApplicationInsights-JS/blob/4835556ce61ba902e4da0b85e76d7f175a39ffea/channels/offline-channel-js/src/Providers/WebStorageProvider.ts#L221

Install

This package declares the following peer dependencies in package.json (consumers must install these in their app):

  • @microsoft/applicationinsights-offlinechannel-js ^0.3.10
  • @react-native-async-storage/async-storage ^2.0.0

Using npm (install the library and the required peers):

npm install np-application-insights-async-storage
npm install @react-native-async-storage/async-storage@^2.0.0
npm install @microsoft/applicationinsights-offlinechannel-js@^0.3.10

Using yarn:

yarn add np-application-insights-async-storage
yarn add @react-native-async-storage/async-storage@^2.0.0
yarn add @microsoft/applicationinsights-offlinechannel-js@^0.3.10

Usage

Follow the usage setup by @microsoft/applicationinsights-offlinechannel-js. Set the customProvider to AsyncStorageProvider. If you are in an environment where localstorage is unavailable, set the customUnloadProvider as well.

Example:

import { OfflineChannel } from '@microsoft/applicationinsights-offlinechannel-js';
import AsyncStorageProvider from '@np/application-insights-async-storage';

// create provider (constructor accepts the same options shape as WebStorageProvider)
const storageProvider = new AsyncStorageProvider();

// wire it into your offline channel / configuration in place of WebStorageProvider
const offlineChannel = new OfflineChannel();
const appInsights = new ApplicationInsights({
  config: {
    connectionString: '',
    extensionsConfig: {
      [offlineChannel.identifier]: {
        minPersistenceLevel: 0,
+        customProvider: new AsyncStorageProvider(),
+        customUnloadProvider: new AsyncStorageUnloadProvider()
      }
    }
  }
})
appInsights.loadAppInsights();
appInsights.addPlugin(offlineChannel);

Notes and recommendations