Utilities that assist with parsing load items, and determining file types, etc.
A utility method that builds a file path using a source and a data object, and formats it into a new path.
A formatted string that contains the path and the supplied parameters.
Formats an object into a query string for either a POST or GET request.
If the load item is loading from a different domain than the current location.
If the load item is loading from the "file:" protocol. Assume that the host must be local as well.
Parse a file path to determine the information we need to work with it. Currently, PreloadJS needs to know:
- If the path is absolute. Absolute paths start with a protocol (such as
- If the path is relative. Relative paths start with
- The file extension. This is determined by the filename with an extension. Query strings are dropped, and
the file path is expected to follow the format
An Object with an
relative Boolean values,
the pieces of the path (protocol, hostname, port, pathname, search, hash, host)
as well as an optional 'extension` property, which is the lowercase extension.
The Regular Expression used to test file URLS for an absolute path.
The Regular Expression used to test file URLS for an extension. Note that URIs must already have the query string removed.
The Regular Expression used to test file URLS for a relative path.