Methods
fnvHash(input) → {string}
FNV-1a 64-bit hash function
Parameters:
| Name | Type | Description |
|---|---|---|
input | * | The input to hash |
- Since
- 4.0.2
- Source
Returns:
The 64-bit FNV-1a hash of the input as a 16-character hex string
- Type:
- string
getValidLocale(locale, fallback) → {string}
Returns a valid locale string.
Parameters:
| Name | Type | Description |
|---|---|---|
locale | string | The locale string to validate. |
fallback | string | The fallback locale string. |
- Since
- 4.0.8
- Source
Returns:
The valid locale string.
- Type:
- string
sanitizeLocale(locale) → {string}
Sanitizes a locale string by replacing underscores with hyphens.
Parameters:
| Name | Type | Description |
|---|---|---|
locale | string | The locale string to sanitize. |
- Since
- 4.0.8
- Source
Returns:
The sanitized locale string.
- Type:
- string