UNPKG

@segment/analytics-core

Version:

This package represents core 'shared' functionality that is shared by analytics packages. This is not designed to be used directly, but internal to analytics-node and analytics-browser.

10 lines (9 loc) 250 B
/** * Check if thenable * (instanceof Promise doesn't respect realms) */ export const isThenable = (value: unknown): boolean => typeof value === 'object' && value !== null && 'then' in value && typeof (value as any).then === 'function'