Namespace Pot.MimeType
Defined in: <pot.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
MIME Types utilities.
|
Field Attributes | Field Name and Description |
---|---|
<static> |
Pot.MimeType.MimeTypeMaps
A basic MIME Type object map.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
Pot.MimeType.getExtByMimeType(mimeType)
Gets the extension name from the MIME Type.
|
<static> |
Pot.MimeType.getMimeTypeByExt(extension)
Gets the MIME Type from the extension name.
|
Namespace Detail
Pot.MimeType
MIME Types utilities.
This object is not use "navigator.mimeTypes"
for x-browser and non-browser environment.
Field Detail
<static>
{Object}
Pot.MimeType.MimeTypeMaps
A basic MIME Type object map.
Method Detail
<static>
{Function}
Pot.MimeType.getExtByMimeType(mimeType)
Gets the extension name from the MIME Type.
debug( getExtByMimeType('application/javascript') ); // @results 'js'
- Parameters:
- {String} mimeType
- MIME Type.
- Returns:
- {String} Extension name.
<static>
{Function}
Pot.MimeType.getMimeTypeByExt(extension)
Gets the MIME Type from the extension name.
debug( getMimeTypeByExt('js') ); // @results 'application/javascript'
- Parameters:
- {String} extension
- Extension name.
- Returns:
- {String} MIME Type.