is-donottrack
TypeScript icon, indicating that this package has built-in type declarations

1.1.6 • Public • Published

doNotTrack polyfill till IE6 compatibility

Usage

npm i is-donottrack -S


import DoNoTrack from 'is-donottrack'

// then 


DoNoTrack.IsEnabled() // true/false
DoNoTrack.IsUnSupported() // true/false
DoNoTrack.IsDisabled() // true/false
DoNoTrack.Status() // true/false/ new Error('Unsupported!')



Possible Values

It returns Three values

  • true If user has opted for doNotTrack
  • false if user hasn't opted for doNotTrack
  • Error if browser doesn't support it.

Note: Since IE6 supports Error, I am returning Error, I wouldn't care if browser is older than IE6. But it works!

Testing

It should work - I have tested it using BrowserStack and results were all great! If you still find any issue please let me know.

Package Sidebar

Install

npm i is-donottrack

Weekly Downloads

8

Version

1.1.6

License

ISC

Unpacked Size

3.99 kB

Total Files

4

Last publish

Collaborators

  • varunbatrait