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

2.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i is-dnt

Weekly Downloads

11

Version

2.0.0

License

MIT

Unpacked Size

5.99 kB

Total Files

6

Last publish

Collaborators

  • akepinski