Meet npm Pro: unlimited public & private packages + package-based permissions.Learn more »

gdpr-age-of-majority

1.0.3 • Public • Published

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)}`);

Install

npm i gdpr-age-of-majority

DownloadsWeekly Downloads

2

Version

1.0.3

License

MIT

Last publish

Collaborators

  • avatar