lib/validate.js
function date (value) {
  if (Object.prototype.toString.call(value) !== '[object Date]' || isNaN(value)) {
    throw new Error(`Value '${value}' is not a date object.`)
  }
}
function date (value) {
  if (Object.prototype.toString.call(value) !== '[object Date]' || isNaN(value)) {
    throw new Error(`Value '${value}' is not a date object.`)
  }
}
function date ( value ) { if ( Object . prototype . toString . call ( value ) !== '[object Date]' || isNaN ( value ) ) { throw new Error ( ` ${ value } ` ) } }
Validace data.
Validace data .