Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider dropping is-promise as a dependency #136

Open
jonkoops opened this issue Oct 27, 2024 · 0 comments · May be fixed by #137
Open

Consider dropping is-promise as a dependency #136

jonkoops opened this issue Oct 27, 2024 · 0 comments · May be fixed by #137

Comments

@jonkoops
Copy link
Contributor

Currently this module depends on is-promise, which allows 'promise like' objects with a then() method to be interpreted as a promise, for example:

isPromise({then:function () {...}}); // true

This has been historically done to handle polyfilling Promises in environments where they were not yet fully supported (e.g. the Promise global is not available). Since this is no longer needed as promises are widely supported it might be time to drop this dependency and instead use a simple instanceof Promise check, which would only allow standardized promises.

jonkoops added a commit to jonkoops/router that referenced this issue Oct 27, 2024
BREAKING: drops support for non-native promises

Closes pillarjs#136

Signed-off-by: Jon Koops <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant