@petsel/es-type-detection - v1.0.0
    Preparing search index...

    Function doesMatchSafeThenable

    • Verifies whether the passed value is either object or function that features a then method, where the latter explicitly is either of both function variants - arrow expression or function expression/statement - thus, a then method is neither an async nor a generator function. Like doesMatchThenable this function runs a shallow check of whether the test candidate features the most basic Thenable behavior/trait, just being stricter about the nature of a then method.

      Parameters

      • Optionalvalue: any

        An optionally passed value of any type.

      Returns value is Thenable

      A boolean value which indicates whether the tested value does qualify as to be safely applied/used Thenable.