function getExtension (url) {

	if (typeof url !== 'string') {
		throw new Error('`url` argument must be a string');
	}

	const baseUrl = url.split('?')[0], baseName = baseUrl.split('\\').pop().split('/').pop();
	return ~baseName.indexOf('.') ? baseName.substring(baseName.lastIndexOf('.') + 1) : '';
}
Get media file extension from URL

@param {String} url
@return {String}