2.0.0 • Published 6 years ago
is-dnt v2.0.0
is-dnt

Check whether the Do not track (DNT) policy is enabled in user's browser or not
Highlights
- Supports all major browsers (from Internet Explorer 6)
- 0 dependencies
- Written in TypeScript
Install
$ npm install is-dntUsage
const isDnt = require('is-dnt');
isDnt(); //=> trueAPI
isDnt()
Returns a boolean of whether the Do not track policy is enabled and undefined if the browser does not support DNT.
Notice
This package uses the solution described by Corbin Davenport in his How to correctly check for Do Not Track with JavaScript post.
License
MIT © Antoni Kepinski