koel/resources/assets/js/utils/helpers.ts
2022-04-15 16:24:30 +02:00

9 lines
182 B
TypeScript

export const use = <T>(value: T, cb: (arg: T) => void): void => {
if (typeof value === 'undefined' || value === null) {
return
}
cb(value)
}
export const noop = () => {}