]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/core-utils/common/promises.ts
Merge branch 'release/3.3.0' into develop
[github/Chocobozzz/PeerTube.git] / shared / core-utils / common / promises.ts
1 function isPromise (value: any) {
2 return value && typeof value.then === 'function'
3 }
4
5 function isCatchable (value: any) {
6 return value && typeof value.catch === 'function'
7 }
8
9 export {
10 isPromise,
11 isCatchable
12 }