You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: case.rs
    path of file: ./repos/biome/crates/biome_js_analyze/src/utils
    
    the code of the file until where you have to start completion: /// Represents the [Case] of a string.
///
/// Note that some cases are superset of others.
/// For example, `Case::Camel` includes `Case::Lower`.
/// See [Case::is_compatible_with] for more details.
#[derive(Debug, Default, Copy, Clone, Eq, PartialEq, Hash)]
pub enum Case {
    /// Unknown case
    #[default]
    Unknown,
    /// camelCase
    Camel,
    // CONSTANT_CASE
    Constant,
    /// kebab-case
    Kebab,
    /// lowercase
    Lower,
    /// A, B1, C42
    NumberableCapital,
    /// PascalCase
    Pascal,
    /// snake_case
    Snake,
    /// Alphanumeric Characters that cannot be in lowercase or uppercase (numbers and syllabary)
    Uni,
    /// UPPERCASE
    Upper,
}

impl Case {
    /// Returns the [Case] of `value`.
    ///
    /// If `strict` is `true`, then two consecutive uppercase characters are not
    /// allowed in camelCase and PascalCase.
    /// For instance, `HTTPServer` is not considered in _PascalCase_ when `strict` is `true`.
    ///
    /// A figure is considered both uppercase and lowercase.
    /// Thus, `V8_ENGINE` is in _CONSTANt_CASE_ and `V8Engine` is in _PascalCase_.
    ///
    /// ### Examples
    ///
    /// ```
    /// use biome_js_analyze::utils::case::Case;
    ///
    /
    
    pub fn convert(self, value: &str) -> String {
        if value.is_empty() || matches!(self, Case::Unknown) {
            return value.to_string();
        }
        let mut word_separator = matches!(self, Case::Pascal);
        let mut output = String::with_capacity(value.len());
        for ((i, current), next) in value
            .char_indices()
            .zip(value.chars().skip(1).map(Some).chain(Some(None)))
        {
            if !current.is_alphanumeric()
                || (matches!(self, Case::Uni) && (current.is_lowercase() || current.is_uppercase()))
            {
                word_separator = true;
                continue;
            }
            if let Some(next) = next {
                if i != 0 && current.is_uppercase() && next.is_lowercase() {
                    word_separator = true;
                }
            }
            if word_separator {
                match self {
                    Case::Camel
                    | Case::Lower
                    | Case::NumberableCapital
                    | Case::Pascal
                    | Case::Unknown
                    | Case::Uni
                    | Case::Upper => (),
                    Case::Constant | Case::Snake => {
                        output.push('_');
                    }
                    Case::Kebab => {
                        output.push('-');
                    }
                }
            }
            match self {
                Case::Camel | Case::Pascal => {
                    if word_separator {
                        output.extend(current.to_uppercase())
                    } else {
                        output.extend(current.to_lowercase())
                    }
                }
                Case::Constant | Case::Upper => output.extend(current.to_uppercase()),
                Case::NumberableCapital => {
                    if i == 0 {
                        output.extend(current.to_uppercase());
                    }
                }
                Case::Kebab | Case::Snake | Case::Lower => output.extend(current.to_lowercase()),
                Case::Uni => output.extend(Some(current)),
                Case::Unknown => (),
            }
            word_separator = false;
            if let Some(next) = next {
                if current.is_lowercase() && next.is_uppercase() {
                    word_separator = true;
                }
            }
        }
        output
    }