@pidgeyjs/utils
v0.1.0
Published
Lightweight runtime utilities for Pidgey
Readme
Pidgey Utils
Lightweight runtime utilities for Pidgey with zero external dependencies.
Installation
This package is internal to the Pidgey monorepo.
# In other packages
pnpm add @pidgeyjs/utils --workspaceUsage
import { sleep, formatVersion } from '@pidgeyjs/utils';
// Sleep for 1 second
await sleep(1000);
// Format version numbers
const version = formatVersion(42); // "00042"Available Utilities
Async Utilities
sleep(ms: number): Promise<void>- Promise-based delay
Format Utilities
formatVersion(version: number): string- Format version numbers with leading zeros (5 digits)
Design Philosophy
This package contains runtime utilities only. It has:
- ✅ Zero external dependencies
- ✅ Minimal bundle size
- ✅ Type-safe utilities
- ❌ No CLI-specific code (see
@pidgeyjs/devkitfor that)
Used by: @pidgeyjs/core, @pidgeyjs/postgres, @pidgeyjs/sqlite, @pidgeyjs/redis, and other runtime packages.
