export function isChromatic(windowArg?: any) { const windowToCheck = windowArg || (typeof window !== 'undefined' && window); return !!( windowToCheck && (windowToCheck.navigator.userAgent.match(/Chromatic/) || windowToCheck.location.href.match(/chromatic=true/)) ); }