Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

gdpr-age-of-majority

visualjeff15MIT1.0.3

EU GDPR age of majority / consent validator

gdpr, age, majority

readme

About GDPR-AgeOfMajority

Validate whether an individual is an adult according to GDPR (eu rules).

Build Status bitHound Overall Score bitHound Dependencies bitHound Dev Dependencies bitHound Code

Install

npm install gdpr-age-of-majority --save

Usage

'use strict';

const AgeOfMajority = require('gdpr-age-of-majority'); //Import validation function.

const birthDate = '1967-05-01'; //Sample birth date
const countryCode = 'IT'; //Italy 

console.log(`Is adult: ${AgeOfMajority.isAdult(birthDate, countryCode)}`);