node_modules/face-api.js/node_modules/@tensorflow/tfjs-core/dist/io/http.js
/**
 * Extract the prefix and suffix of the url, where the prefix is the path before
 * the last file, and suffix is the search params after the last file.
 * ```
 * const url = 'http://tfhub.dev/model/1/tensorflowjs_model.pb?tfjs-format=file'
 * [prefix, suffix] = parseUrl(url)
 * // prefix = 'http://tfhub.dev/model/1/'
 * // suffix = '?tfjs-format=file'
 * ```
 * @param url the model url to be parsed.
 */
Extract the prefix and suffix of the url, where the prefix is the path before
the last file, and suffix is the search params after the last file.
Extract the prefix and suffix of the url where the prefix is the path before the last file and suffix is the search params after the last file .
function parseUrl(url) {
    var lastSlash = url.lastIndexOf('/');
    var lastSearchParam = url.lastIndexOf('?');
    var prefix = url.substring(0, lastSlash);
    var suffix = lastSearchParam > lastSlash ? url.substring(lastSearchParam) : '';
    return [prefix + '/', suffix];
}
function parseUrl ( url ) { var lastSlash = url . lastIndexOf ( '/' ) ; var lastSearchParam = url . lastIndexOf ( '?' ) ; var prefix = url . substring ( 0 , lastSlash ) ; var suffix = lastSearchParam > lastSlash ? url . substring ( lastSearchParam ) : '' ; return [ prefix + '/' , suffix ] ; }
Extract the prefix and suffix of the url, where the prefix is the path before
 the last file, and suffix is the search params after the last file.
Extract the prefix and suffix of the url where the prefix is the path before the last file and suffix is the search params after the last file .