Skip to content

choose another name that makes it clear we just mean native promises #3

@michaelficarra

Description

@michaelficarra

I understand that this name is meant to mimic Array.isArray and Error.isError because, like Array with magic length and Error with magic stack, native promises have magic await behaviour. But unlike Arrays and Errors, I had to be clear in my previous sentence when I said "native promises". The usage of the word "promise" in the community means not only native promises but also promises from popular promise libraries. Having an isPromise function return false for those just doesn't seem right. I think this concern should override the consistency argument and we should rename this function to something like isNativePromise or isBuiltinPromise or even like hasMagicPromiseShortcuts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions