Skip to content
MapSVG 8/Documentation

strings

const strings: object;
convertToText: (obj) => any;

Converts an object to a string representation.

ParameterTypeDescription
objany

any

fixColorHash: (color) => string;

Adds a hash to a color string if missing.

ParameterTypeDescription
colorstring

string

functionFromString: (string) => SyntaxError | TypeError;

Converts a string to a function.

ParameterTypeDescription
stringstring

SyntaxError | TypeError

Function or object {error: "error text"}

removeLeadingSlash: (str) => any;

Removes a leading slash from a string.

ParameterTypeDescription
strany

any

safeURL: (url) => any;

Normalizes a URL by removing the protocol and domain.

ParameterTypeDescription
urlany

any

toSnakeCase: (str) => string;

Converts a string to snake_case.

ParameterTypeDescription
strstring

string

ucfirst: (string) => any;

Uppercases the first character of a string.

ParameterTypeDescription
stringany

any