This commit is contained in:
10
node_modules/@iarna/toml/lib/create-datetime.js
generated
vendored
Executable file
10
node_modules/@iarna/toml/lib/create-datetime.js
generated
vendored
Executable file
@@ -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