Checks if a value is a Promise. Its 2024 and we still need this ;-(
Consider the JS status quo:
Promise.isPromise === undefined
_.isPromise === undefined
typeof Promise === 'function'
typeof new Promise === 'object'
The only way to check is: new Promise instanceof Promise === true
new Promise instanceof Promise === true
With Zen we have:
isPromise(promise) === true
and also
type(promise) = 'Promise'
type(Promise) === 'class'
classType(Promise) === 'systemClass'
constructor(new Promise) === Promise
true if the value is a Promise
Checks if a value is a Promise. Its 2024 and we still need this ;-(
Consider the JS status quo:
Promise.isPromise === undefined
_.isPromise === undefined
typeof Promise === 'function'
typeof new Promise === 'object'
The only way to check is:
new Promise instanceof Promise === true
With Zen we have:
isPromise(promise) === true
and also
type(promise) = 'Promise'
type(Promise) === 'class'
classType(Promise) === 'systemClass'
constructor(new Promise) === Promise