Skip to main content

Variable: strings

const strings: object;

Type declaration

convertToText()

convertToText: (obj) => any;

Converts an object to a string representation.

Parameters

ParameterTypeDescription
objany

Returns

any

fixColorHash()

fixColorHash: (color) => string;

Adds a hash to a color string if missing.

Parameters

ParameterTypeDescription
colorstring

Returns

string

functionFromString()

functionFromString: (string) => SyntaxError | TypeError;

Converts a string to a function.

Parameters

ParameterTypeDescription
stringstring

Returns

SyntaxError | TypeError

Function or object {error: "error text"}

removeLeadingSlash()

removeLeadingSlash: (str) => any;

Removes a leading slash from a string.

Parameters

ParameterTypeDescription
strany

Returns

any

safeURL()

safeURL: (url) => any;

Normalizes a URL by removing the protocol and domain.

Parameters

ParameterTypeDescription
urlany

Returns

any

toSnakeCase()

toSnakeCase: (str) => string;

Converts a string to snake_case.

Parameters

ParameterTypeDescription
strstring

Returns

string

ucfirst()

ucfirst: (string) => any;

Uppercases the first character of a string.

Parameters

ParameterTypeDescription
stringany

Returns

any