UNPKG

@visulima/cerebro

Version:

A delightful toolkit for building cross-runtime CLIs for Node.js, Deno, and Bun.

25 lines (24 loc) 911 B
/** * Validates that a string is not empty or whitespace-only. */ export declare const validateNonEmptyString: (value: unknown, fieldName: string) => string; /** * Validates that a value is an array of strings. */ export declare const validateStringArray: (value: unknown, fieldName: string) => string[]; /** * Validates that a value is a function. */ export declare const validateFunction: (value: unknown, fieldName: string) => (...args: unknown[]) => unknown; /** * Validates that a value is an object (but not null). */ export declare const validateObject: (value: unknown, fieldName: string) => Record<string, unknown>; /** * Validates command name format and prevents malicious inputs. */ export declare const validateCommandName: (name: string) => string; /** * Validates plugin name format and prevents malicious inputs. */ export declare const validatePluginName: (name: string) => string;