Skip to content
πŸ•΅οΈ Check whether the Do not track (DNT) policy is enabled in user's browser or not
Branch: master
Clone or download
Latest commit 7ef0ae6 Jul 8, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Format type πŸ’„ Jun 30, 2019
.editorconfig Add tests πŸš€ Jun 28, 2019
.gitignore Add tests πŸš€ Jun 28, 2019
.npmrc Initial commit Jun 11, 2019
.travis.yml Add tests πŸš€ Jun 28, 2019
LICENSE Remove year from license Jul 8, 2019
package.json Fix test script Jul 8, 2019
readme.md Credit snippet author Jun 26, 2019
test.ts Write ava tests in TypeScript Jul 8, 2019
tsconfig.json Format tsconfig πŸ’„ Jun 30, 2019

readme.md

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

You can’t perform that action at this time.