index.js
function (value) {
    assertErr(value instanceof Date, TypeError, 'Field error: value is not an instance of Date')
    assertErr(!isNaN(value.getTime()), TypeError, 'Field error: value is an invalid Date')
    return value.toJSON()
  }
function (value) {
    assertErr(value instanceof Date, TypeError, 'Field error: value is not an instance of Date')
    assertErr(!isNaN(value.getTime()), TypeError, 'Field error: value is an invalid Date')
    return value.toJSON()
  }
function ( value ) { assertErr ( value instanceof Date , TypeError , 'Field error: value is not an instance of Date' ) assertErr ( ! isNaN ( value . getTime ( ) ) , TypeError , 'Field error: value is an invalid Date' ) return value . toJSON ( ) }
Serialize date value into string
@param  {Date} value date value
@return {String} date as string
Serialize date value into string