isArray to native Array.isArray

isUnd(*) to native undefined === *
isFunc to native typeof * === 'function'
isObject to native typeof * === 'object'
microtime() to native Date().getTime();
noop to native ()=>{}
noopFalse to native ()=>false
noopTrue to native ()=>true
boolToAjax to native *?'1':'0'
Underscore.js to native
This commit is contained in:
djmaze 2020-07-29 21:49:41 +02:00
parent fa39c7ecba
commit ea48f5060b
72 changed files with 551 additions and 775 deletions

View file

@ -22,8 +22,6 @@ $hcont
.css({ position: 'absolute', left: -5000 })
.appendTo($body);
export const startMicrotime = new window.Date().getTime();
/**
* @type {boolean}
*/
@ -48,29 +46,13 @@ export const sUserAgent =
/**
* @type {boolean}
*/
export const bIE = sUserAgent.includes('msie');
/**
* @type {boolean}
*/
export const bChrome = sUserAgent.includes('chrome');
/**
* @type {boolean}
*/
export const bSafari = !bChrome && sUserAgent.includes('safari');
export const bSafari = !sUserAgent.includes('chrome') && sUserAgent.includes('safari');
/**
* @type {boolean}
*/
export const bMobileDevice = (/android|iphone|ipod|ipad|blackberry|mobile/i).test(sUserAgent);
/**
* @type {boolean}
*/
export const bIsHttps =
window.document && window.document.location ? 'https:' === window.document.location.protocol : false;
/**
* @type {Object}
*/
@ -148,12 +130,6 @@ export const htmlEditorLangsMap = {
'zh_tw': 'zh'
};
/**
* @type {boolean}
*/
let bAllowPdfPreview = !bMobileDevice && undefined !== window.navigator.mimeTypes['application/pdf'];
export { bAllowPdfPreview };
export const VIEW_MODELS = {
settings: [],