1
0
Fork 0
peertube/shared/core-utils/common/promises.ts

13 lines
217 B
TypeScript
Raw Normal View History

2021-07-26 09:04:37 -04:00
function isPromise (value: any) {
return value && typeof value.then === 'function'
}
function isCatchable (value: any) {
return value && typeof value.catch === 'function'
}
export {
isPromise,
isCatchable
}