Skip to content
/ is-dnt Public

🕵️ Check whether the Do not track (DNT) policy is enabled in user's browser or not

License

Notifications You must be signed in to change notification settings

xxczaki/is-dnt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-dnt Build Status XO code style

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-dnt

Usage

const isDnt = require('is-dnt');

isDnt(); //=> true

API

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