You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be cool to have a charset function from mime-types:
constEXTRACT_TYPE_REGEXP=/^\s*([^;\s]*)(?:;|\s|$)/constTEXT_TYPE_REGEXP=/^text\//iexportfunctioncharset(type){if(!type||typeoftype!=='string')returnfalseconstmatch=EXTRACT_TYPE_REGEXP.exec(type)constmime=match&&db[match[1].toLowerCase()]if(mime&&mime.charset)returnmime.charset// default text/* to utf-8if(match&&TEXT_TYPE_REGEXP.test(match[1]))return'UTF-8'returnfalse}
Would be cool to have a
charset
function from mime-types:https://github.com/jshttp/mime-types/blob/c6ff9b224577f0cd49f1155f421b24c24a57bc3e/index.js#L49-L68
The text was updated successfully, but these errors were encountered: