UNPKG

mobx-easy-form

Version:

Simple and performant form library built with MobX

11 lines (10 loc) 216 B
export function isPromise<T, S>( value: PromiseLike<T> | S ): value is PromiseLike<T> { return !!( value && typeof value === "object" && "then" in value && typeof value.then === "function" ); }