• File: invalid.js
  • Full Path: /var/www/nodejs/Notifications_Imali_API/node_modules/luxon/src/impl/invalid.js
  • Date Modified: 10/26/1985 3:15 PM
  • File size: 282 bytes
  • MIME-type: text/plain
  • Charset: utf-8
export default class Invalid {
  constructor(reason, explanation) {
    this.reason = reason;
    this.explanation = explanation;
  }

  toMessage() {
    if (this.explanation) {
      return `${this.reason}: ${this.explanation}`;
    } else {
      return this.reason;
    }
  }
}