routie dev init since i didn't adhere to any proper guidance up until now
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
'use strict'
|
||||
module.exports = value => {
|
||||
const date = new Date(value)
|
||||
/* istanbul ignore if */
|
||||
if (isNaN(date)) {
|
||||
throw new TypeError('Invalid Datetime')
|
||||
} else {
|
||||
return date
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user