mirror of
https://github.com/ferdikoomen/openapi-typescript-codegen.git
synced 2025-12-08 20:16:21 +00:00
8 lines
232 B
TypeScript
8 lines
232 B
TypeScript
/**
|
|
* Check if a value is defined
|
|
* @param value
|
|
*/
|
|
export function isDefined<T>(value: T | undefined | null | ''): value is Exclude<T, undefined | null | ''> {
|
|
return value !== undefined && value !== null && value !== '';
|
|
}
|