UNPKG

detect-features

Version:

Detect and report browser and hardware features.

18 lines (14 loc) 342 B
// @ts-check /** * Checks if the user has DoNotTrack enabled * This is useful for adhering to user wishes regarding analytics tracking * * @returns {boolean} */ export default (() => { const doNotTrack = navigator.doNotTrack || false; if (!!doNotTrack && doNotTrack !== 'unspecified') { return true; } return false; })();