Class

CaseMapper

CaseMapper(optionsopt)

Create a new string mapper instance that maps strings to upper or lower case. This mapping will work for any string as characters that have no case will be returned unchanged.

The options may contain any of the following properties:

  • locale - locale to use when loading the mapper. Some maps are locale-dependent, and this locale selects the right one. Default if this is not specified is the current locale.
  • direction - "toupper" for upper-casing, or "tolower" for lower-casing. Default if not specified is "toupper".
Constructor

# new CaseMapper(optionsopt)

Parameters:
Name Type Attributes Description
options Object <optional>

options to initialize this mapper

View Source CaseMapper.js, line 46

Methods

# getLocale() → {Locale}

Return the locale that this mapper was constructed with.

View Source CaseMapper.js, line 159

the locale that this mapper was constructed with

Locale

# map(string) → {string|undefined}

Map a string to lower case in a locale-sensitive manner.

Parameters:
Name Type Description
string string | undefined

View Source CaseMapper.js, line 169

string | undefined