strings
Variable: strings
Section titled “Variable: strings”const strings: object;Type declaration
Section titled “Type declaration”convertToText()
Section titled “convertToText()”convertToText: (obj) => any;Converts an object to a string representation.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
obj | any |
Returns
Section titled “Returns”any
fixColorHash()
Section titled “fixColorHash()”fixColorHash: (color) => string;Adds a hash to a color string if missing.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
color | string |
Returns
Section titled “Returns”string
functionFromString()
Section titled “functionFromString()”functionFromString: (string) => SyntaxError | TypeError;Converts a string to a function.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
string | string |
Returns
Section titled “Returns”SyntaxError | TypeError
Function or object {error: "error text"}
removeLeadingSlash()
Section titled “removeLeadingSlash()”removeLeadingSlash: (str) => any;Removes a leading slash from a string.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
str | any |
Returns
Section titled “Returns”any
safeURL()
Section titled “safeURL()”safeURL: (url) => any;Normalizes a URL by removing the protocol and domain.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
url | any |
Returns
Section titled “Returns”any
toSnakeCase()
Section titled “toSnakeCase()”toSnakeCase: (str) => string;Converts a string to snake_case.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
str | string |
Returns
Section titled “Returns”string
ucfirst()
Section titled “ucfirst()”ucfirst: (string) => any;Uppercases the first character of a string.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
string | any |
Returns
Section titled “Returns”any