Skip to content

lgodard/do-not-track

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

do-not-track

Accessing the user's preferences in terms of tracking can be slightly complicated. This module simplifies that.

Install

npm install --save donottrack

Usage

Browser:

import doNotTrack from 'donottrack';

// Returns true if the user do not want to be tracked, false otherwise.
const do_not_track = doNotTrack(/* default, if preferences are not set. */ false);

Node:

import doNotTrack from 'donottrack';

const do_not_track = doNotTrack(req.header('DNT'), false);

About

Module to check the value of the DNT header

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%