mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-19 11:42:52 +00:00
4 lines
163 B
TypeScript
4 lines
163 B
TypeScript
export const executeIfDefined = <T, R>(func: (input: T) => R, input: T | undefined): R | undefined => {
|
|
return input === undefined ? undefined : func(input);
|
|
};
|