koel/resources/assets/js/utils/helpers.ts

10 lines
182 B
TypeScript
Raw Normal View History

2022-04-15 14:24:30 +00:00
export const use = <T>(value: T, cb: (arg: T) => void): void => {
if (typeof value === 'undefined' || value === null) {
return
}
cb(value)
}
export const noop = () => {}