houdini/javascripts/src/lib/utils.ts

4 lines
120 B
TypeScript
Raw Normal View History

2018-10-01 15:31:18 -05:00
// License: LGPL-3.0-or-later
export function castToNullIfUndef<T>(i:T): T | null{
return i === undefined ? null : i
}