New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@johnqh/lib

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@johnqh/lib

React Native-compatible shared utilities library for 0xmail.box projects with Optional<T> type safety patterns and comprehensive blockchain integration

latest
Source
npmnpm
Version
3.4.17
Version published
Maintainers
1
Created
Source

@johnqh/lib

Shared utilities and common functions for 0xmail.box projects.

Installation

npm install @johnqh/lib

Features

Environment Management

Platform-agnostic environment variable management that works across web and React Native environments.

Basic Usage

import { env, getAppConfig } from '@johnqh/lib';

// Check environment
if (env.isDevelopment()) {
  console.log('Running in development mode');
}

// Get environment variables
const apiToken = env.get('VITE_WILDDUCK_API_TOKEN', 'default-value');

// Get full app configuration
const config = getAppConfig();
console.log(config.wildDuckApiToken);

Web Environment (Vite)

import { WebEnvProvider, createWebAppConfig } from '@johnqh/lib';

const envProvider = new WebEnvProvider();
const config = createWebAppConfig(envProvider);

React Native Environment

import { ReactNativeEnvProvider, createReactNativeAppConfig } from '@johnqh/lib';
import Config from 'react-native-config'; // Optional

const envProvider = new ReactNativeEnvProvider(Config);
const config = createReactNativeAppConfig(envProvider);

Supported Environment Variables

  • VITE_WILDDUCK_API_TOKEN
  • VITE_REVENUECAT_API_KEY
  • VITE_WALLETCONNECT_PROJECT_ID
  • VITE_PRIVY_APP_ID
  • VITE_FIREBASE_* (Firebase configuration)
  • VITE_USE_CLOUDFLARE_WORKER
  • VITE_CLOUDFLARE_WORKER_URL
  • VITE_USE_MOCK_FALLBACK

Development

# Build the library
npm run build

# Watch for changes
npm run build:watch

# Clean build directory
npm run clean

License

MIT

Keywords

web3

FAQs

Package last updated on 11 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts