Methods
capitaliseFirstLetter(loweropt) → {string}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
lower |
boolean |
<optional> |
false
|
Flag if it should lower all letters first |
Returns:
New string
- Type
- string
includes(search, startopt) → {boolean}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
search |
string | Search for | ||
start |
number |
<optional> |
0
|
Searching start position |
Returns:
Verdict
- Type
- boolean
isLike(query) → {boolean}
- Description:
- Check if string is like given query (you can use regexp notation)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
query |
string | Query |
Returns:
Verdict
- Type
- boolean
lowerFirstLetter() → {string}
Returns:
New string
- Type
- string
noCase() → {string}
Returns:
New string
- Type
- string
reverse() → {string}
Returns:
Reversed string
- Type
- string
toBoolean() → {boolean}
Returns:
True if string looks somehow like 'true'
- Type
- boolean
toCamelCase() → {string}
Returns:
String in camelCase
- Type
- string
toChecksum() → {string}
- Description:
- Returns checksum crc32
- Source:
- See:
Returns:
Checksum
- Type
- string
toKebabCase() → {string}
Returns:
String in kebab-case
- Type
- string
toPascalCase() → {string}
Returns:
String in PascalCase
- Type
- string
toSnakeCase(convertToUpperCaseopt) → {string}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
convertToUpperCase |
boolean |
<optional> |
false
|
Set this flag to convert to UpperCase |
Returns:
String in snake_case
- Type
- string
(static) editDistance(a, b) → {number}
- Description:
- Calculate edit distance between string a and b
- Source:
- See:
Parameters:
Name | Type | Description |
---|---|---|
a |
string | A |
b |
string | B |
Returns:
Distance
- Type
- number
(static) getSimilarity(a, b) → {number}
- Description:
- Get similarity ratio based on edit distance
- Source:
- See:
Parameters:
Name | Type | Description |
---|---|---|
a |
string | A |
b |
string | B |
Returns:
Ratio
- Type
- number
(static) isEmpty(sth) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
sth |
string | Something to check |
Returns:
Verdict
- Type
- boolean
(static) isInvalidOrEmpty(sth) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
sth |
string | Something to check |
Returns:
Verdict
- Type
- boolean
(static) isNotEmpty(sth) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
sth |
string | Something to check |
Returns:
Verdict
- Type
- boolean