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

react-native-vault-logger

v0.1.3

Published

A secure, encrypted local vault logger for React Native

Readme

react-native-vault-logger

A secure, encrypted local vault logger for React Native.

react-native-vault-logger captures uncaught JavaScript errors and lets you log handled exceptions manually. Logs are encrypted with AES-CBC before they are stored in AsyncStorage.

Features

  • Global handler for uncaught errors and fatal crashes
  • Manual error logging with optional context
  • Encrypted storage at rest (AES-CBC via crypto-js)
  • In-memory read API with newest logs first
  • Export encrypted payload for backend upload
  • Configurable log retention limit

Requirements

  • React Native >= 0.70
  • @react-native-async-storage/async-storage (peer dependency, installed automatically with this package)

Installation

npm install react-native-vault-logger
# or
yarn add react-native-vault-logger

Install and link AsyncStorage if it is not already in your app:

npm install @react-native-async-storage/async-storage
cd ios && pod install

Usage

Initialization

Call init once at app startup (for example in App.tsx or your root entry file). Use a 32-character key and 16-character IV for AES-CBC.

import { CrashLogService } from 'react-native-vault-logger';

await CrashLogService.init({
  encryptionKey: 'your-32-byte-secure-secret-key-12', // 32 characters
  encryptionIV: 'your-16-byte-iv1',                  // 16 characters
  maxLogCount: 1000,                                 // optional, default: 1000
});

After init, uncaught errors are routed through the global handler and stored with context UNCAUGHT_ERROR or FATAL_CRASH.

Manual logging

try {
  // your code
} catch (error) {
  await CrashLogService.logError(error, {
    context: 'PAYMENT_FLOW',
  });
}

Reading logs

Returns decrypted logs, newest first:

const logs = CrashLogService.getLogs();

Each entry matches CrashLogModel:

| Field | Type | Description | | ------------ | ------ | ------------------------------------ | | timestamp | string | ISO-8601 time | | error | string | Error message | | stackTrace | string | Stack trace when available | | context | string | Source label (for example FATAL_CRASH) | | deviceInfo | string | Device label (default placeholder) | | appVersion | string | App version (default placeholder) |

Export encrypted logs

const encryptedData = await CrashLogService.exportEncryptedLogs();
// Send encryptedData to your backend over HTTPS

Clear logs

await CrashLogService.clearLogs();

Example app

A bare React Native example lives in example/. From that folder:

npm install
cd ios && pod install && cd ..
npm run ios
# or
npm run android

Security

Do not hardcode production encryption keys in source. Prefer a secure keystore, environment configuration, or runtime secret delivery.

Logs are encrypted locally before being written to AsyncStorage. Decrypted logs are only available in memory through getLogs().

Publishing (maintainers)

npm run build
npm publish --access public

License

MIT