MCPcopy Create free account
hub / github.com/dcloudio/mui / mimeToDataType

Function mimeToDataType

js/mui.ajax.js:100–108  ·  view source on GitHub ↗
(mime)

Source from the content-addressed store, hash-verified

98 return(url + '&' + query).replace(/[&?]{1,2}/, '?');
99 };
100 var mimeToDataType = function(mime) {
101 if(mime) {
102 mime = mime.split(';', 2)[0];
103 }
104 return mime && (mime === htmlType ? 'html' :
105 mime === jsonType ? 'json' :
106 scriptTypeRE.test(mime) ? 'script' :
107 xmlTypeRE.test(mime) && 'xml') || 'text';
108 };
109 var parseArguments = function(url, data, success, dataType) {
110 if($.isFunction(data)) {
111 dataType = success, success = data, data = undefined;

Callers 1

mui.ajax.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected