Tool Kit
Collection of utility tools for Nuxt applications. What isn't used is cut at runtime.
Available Tools
$assert
Type-safe validation with ArkType integration.
import { $assert } from '#appkit/tools'
const result = $assert(data, validator)Find out more here
$bus
Event bus system for component communication.
const { $bus } = defineBus("bus-name")Find out more here
$cache
Global caching system with automatic cleanup.
import { $cache } from '#appkit/tools'Find out more here
$code
HTTP status codes and application error codes.
import { $code } from '#appkit/tools'Find out more here
$email
Template-based email system using Vue components.
const { $email } = defineEmail({ templates })Find out more here
$env
Environment variables and runtime configuration access.
import { $env } from '#appkit/tools'
const env = $env()Find out more here
$flags
Feature flags and boolean configuration management.
import { $flags } from '#appkit/tools'Find out more here
$id
Secure URL-friendly unique ID generation.
import { $id } from '#appkit/tools'
const id = $id() // 21-char nanoid
const shortId = $id("nano", 8) // Custom length
const customId = $id("custom", "abc123", 6) // Custom alphabetFind out more here
$message
Message handling and display system.
import { $message } from '#appkit/tools'Find out more here
$toast
Toast notification system with Vue components.
const { $toast } = defineToasts({ components })Find out more here
sleep
Simple async sleep utility function.
import { sleep } from '#appkit/tools'
await sleep(1000) // Wait 1 secondUtilities in Development
The following tools are in development and not yet available:
- $modal - Modal component system (planned)
- $time - Time manipulation utilities (in development)
- $pdf - PDF generation tools (in development)
- $tasks - Task queue management (in development)