getFileName

Function

Get the file name out of a url. Will return either the hostname, or the pathname if it exists

  • getFileName(url: string) : string

Parameters

Parameter Type Default Notes
url Required string

Url to get a file name out of

Returns

{string}

string

Function defined in common/src/resources/_internal/_validate-url-helpers.ts:31