utils.string.isDataUrl

isDataUrl(str: string) → {boolean}

returns true if the given string is a data url in the data:[<mediatype>][;base64],<data> format. (this will not test the validity of the Data or Base64 encoding)

Parameters:
Name Type Description
str string

the string (url) to be tested

Returns:
Type Description
boolean

true if the string is a data url

Powered by webdoc!