is-valid-max-age

0.0.1 • Public • Published

is-valid-max-age

Validate that age is below a maximum

Install

npm install is-valid-max-age

Usage

const isValidMaxAge = require('is-valid-max-age');

console.log(isValidMaxAge(new Date(1999, 02, 21), 18)); // false
console.log(isValidMaxAge(new Date(2006, 05, 14), 18)); // true

Test

npm test

Resources

Use is-valid-min-age to validate that age is above a minimum.

License

MIT

Package Sidebar

Install

npm i is-valid-max-age

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • miguelmota