-1…*.indexOf() to native .includes()

This commit is contained in:
djmaze 2020-07-20 21:39:00 +02:00
parent eb15c6e45f
commit 961fa305c9
8 changed files with 19 additions and 19 deletions

View file

@ -49,17 +49,17 @@ export const sUserAgent =
/**
* @type {boolean}
*/
export const bIE = -1 < sUserAgent.indexOf('msie');
export const bIE = sUserAgent.includes('msie');
/**
* @type {boolean}
*/
export const bChrome = -1 < sUserAgent.indexOf('chrome');
export const bChrome = sUserAgent.includes('chrome');
/**
* @type {boolean}
*/
export const bSafari = !bChrome && -1 < sUserAgent.indexOf('safari');
export const bSafari = !bChrome && sUserAgent.includes('safari');
/**
* @type {boolean}