routie dev init since i didn't adhere to any proper guidance up until now
This commit is contained in:
Generated
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
import { CommonOptions } from '../../types/common-options.js'
|
||||
/**
|
||||
* Creates a function that formats strings for comparison.
|
||||
*
|
||||
* Applies transformations based on the provided options:
|
||||
*
|
||||
* - Case normalization (lowercase if ignoreCase is true)
|
||||
* - Special character handling (keep, trim, or remove)
|
||||
* - Whitespace removal (always applied).
|
||||
*
|
||||
* @param params - Parameters for string formatting.
|
||||
* @param params.ignoreCase - Whether to convert strings to lowercase.
|
||||
* @param params.specialCharacters - How to handle special characters:
|
||||
*
|
||||
* - 'keep': Keep all characters as-is
|
||||
* - 'trim': Remove leading special characters
|
||||
* - 'remove': Remove all special characters.
|
||||
*
|
||||
* @returns Function that formats a string for comparison.
|
||||
* @throws {UnreachableCaseError} If an unknown special characters option is
|
||||
* specified.
|
||||
*/
|
||||
export declare function buildStringFormatter({
|
||||
specialCharacters,
|
||||
ignoreCase,
|
||||
}: Pick<CommonOptions, 'specialCharacters' | 'ignoreCase'>): (
|
||||
value: string,
|
||||
) => string
|
||||
Reference in New Issue
Block a user