Initial commit
This commit is contained in:
6
node_modules/validator/es/lib/toDate.js
generated
vendored
Normal file
6
node_modules/validator/es/lib/toDate.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import assertString from './util/assertString';
|
||||
export default function toDate(date) {
|
||||
assertString(date);
|
||||
date = Date.parse(date);
|
||||
return !isNaN(date) ? new Date(date) : null;
|
||||
}
|
||||
Reference in New Issue
Block a user