mirror of https://github.com/Chocobozzz/PeerTube
13 lines
217 B
TypeScript
13 lines
217 B
TypeScript
|
function isPromise (value: any) {
|
||
|
return value && typeof value.then === 'function'
|
||
|
}
|
||
|
|
||
|
function isCatchable (value: any) {
|
||
|
return value && typeof value.catch === 'function'
|
||
|
}
|
||
|
|
||
|
export {
|
||
|
isPromise,
|
||
|
isCatchable
|
||
|
}
|