isPromise property

bool get isPromise

Implementation

bool get isPromise {
  // FIXME: which is right!!!
  const key = '__flujs_internal_isPromise__';
  return _typeCheckInJS(
    key,
    '''
var t = typeof v;
if (t === 'object') { return v instanceof Promise; }
return false;
''',
    ['v'],
  );
}