diff options
Diffstat (limited to 'node_modules/luxon/src/impl/invalid.js')
| -rw-r--r-- | node_modules/luxon/src/impl/invalid.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/node_modules/luxon/src/impl/invalid.js b/node_modules/luxon/src/impl/invalid.js new file mode 100644 index 0000000..2a2c95b --- /dev/null +++ b/node_modules/luxon/src/impl/invalid.js @@ -0,0 +1,14 @@ +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; + } + } +} |
