feat(test): add api branch test
This commit is contained in:
parent
f7c81641b2
commit
1896e2385d
5 changed files with 1251 additions and 1 deletions
10
test/lib/index.ts
Normal file
10
test/lib/index.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
export function isDateString(nullable: boolean = false): (val: any) => boolean {
|
||||
return (value: any) => {
|
||||
try {
|
||||
if (value) return !!new Date(value);
|
||||
return nullable;
|
||||
} catch (_) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue