refactor/project structure
This commit is contained in:
35 files changed
+192
-167
No files matched your search
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* isDefined simply ensures a given input is not
|
||||
* null, undefined, an empty string or NaN.
|
||||
*
|
||||
* @param n to validate
|
||||
* @returns if this object exists (boolean)
|
||||
*/
|
||||
export default function isDefined<T>(n: T | null | undefined | "" | number): n is T
|
||||
{
|
||||
return typeof n === "number" ? !isNaN(n) : n !== null && n !== undefined && n !== "";
|
||||
}
|
||||
Reference in new issue
Block a user