chrono-forge
Version:
A comprehensive framework for building resilient Temporal workflows, advanced state management, and real-time streaming activities in TypeScript. Designed for a seamless developer experience with powerful abstractions, dynamic orchestration, and full cont
13 lines (12 loc) • 496 B
TypeScript
/**
* Sanitizes a property key by replacing special characters with underscores.
* This ensures that property keys are safe to use as object keys and in paths.
*
* @param key - The property key to sanitize
* @returns The sanitized property key
*
* @example
* sanitizePropertyKey('searchResults_potato chips') // returns 'searchResults_potato_chips'
* sanitizePropertyKey('user@email.com') // returns 'user_email_com'
*/
export declare function sanitizePropertyKey(key: string): string;