feat(test): add api branch test

This commit is contained in:
Methapon2001 2025-05-23 17:12:06 +07:00
parent f7c81641b2
commit 1896e2385d
5 changed files with 1251 additions and 1 deletions

10
test/lib/index.ts Normal file
View 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;
}
};
}