UNPKG

@omneedia/socketcluster

Version:

SocketCluster - A Highly parallelized WebSocket server cluster to make the most of multi-core machines/instances.

4 lines (3 loc) 188 B
export function isPromise<T>(value: any | Promise<T>): value is Promise<T> { return value && typeof (<any>value).subscribe !== 'function' && typeof (value as any).then === 'function'; }