UNPKG

is-valid-month

Version:
9 lines (6 loc) 206 B
'use strict' var isInteger = require('is-integer') module.exports = function isValidMonth (month) { if (typeof month !== 'number' || !isInteger(month)) return false return month >= 1 && month <= 12 }