getExtension = function getExtension(type, name) {

	// type does not exist
	if (!Extensions[type]) {
		throw 'Can\'t get extension with type of "' + type + '", "' + type + '" is not a valid extension type. The following types are available: ' + keysToList(Extensions);
	}

	// name in type does not exist
	if (!Extensions[type][name]) {
		throw 'Can\'t get extension with name "' + name + '", "' + name + '" is not available. The following extensions are available: ' + keysToList(Extensions[type]);
	}

	return Extensions[type][name];
}
Returns an extension function by name and type
@param type
@param name
@returns {*}