Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Treat CapitalizedCase (or camelCase) words as beginning of words #11

@dko-slapdash

Description

@dko-slapdash

Hi.

One more tweak we're now playing with is to allow "open td" abbreviation to match "Open ToDesk" string (the same way as it would match "Open To Desk"). This is useful for capitalized names which are frequent in engineering companies.

      } else if (
        SCORE_CAMEL_CASE_WORD_JUMP > 0 &&
        isUpperCase(string.charAt(index)) &&
        !isUpperCase(string.charAt(index - 1))
      ) {
        score *= SCORE_CAMEL_CASE_WORD_JUMP;
      } else if (

function isUpperCase(char) {
  // checks if the character is an uppercase (unicode safe)
  return char.toLocaleUpperCase() === char;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions