Kind: global class
- LoaderUtils
- new LoaderUtils()
- .createXMLHttpRequest() ⇒
XMLHttpRequest
- .getFileName(url) ⇒
string
- .getFontName(url) ⇒
string
- .getFileType(url) ⇒
string
- .getFullUrl(prepend, file, platformGetUrl) ⇒
string
- .getUrlPrepend(path) ⇒
string
- .getParamsFromData(query) ⇒
string
Various single use utilities for file names & paths, and query manipulations.
import { LoaderUtils } from 'ad-load'
Kind: static method of LoaderUtils
Kind: static method of LoaderUtils
Returns: string
- Strips a file path and extension to return the file name
Param | Type | Description |
---|---|---|
url | string |
A full file path including the file name |
Kind: static method of LoaderUtils
Returns: string
- Strips a file path and extension to return the file name
Param | Type | Description |
---|---|---|
url | string |
A full file path including the file name |
Kind: static method of LoaderUtils
Returns: string
- Determines the file type and returns that
Param | Type | Description |
---|---|---|
url | string |
A full file path including the file name |
Kind: static method of LoaderUtils
Returns: string
- Determines the full url path to a file by either matching the protocol or
utilizing a platform tool, such as DoubleClick's Enabler.getUrl
Param | Type | Description |
---|---|---|
prepend | string |
The file path |
file | string |
The file name with extension |
platformGetUrl | function |
Optional platform specific url formatter |
Kind: static method of LoaderUtils
Returns: string
- Removes the file name and extension to retun only the path
Param | Type | Description |
---|---|---|
path | string |
A full file path including the file name |
Kind: static method of LoaderUtils
Returns: string
- Formats a query string and returns it
Param | Type | Description |
---|---|---|
query | string | object |
A query string or object of key/value pairs |