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

feat: add isError function #173

Merged
merged 1 commit into from
Aug 15, 2024
Merged

feat: add isError function #173

merged 1 commit into from
Aug 15, 2024

Conversation

aleclarson
Copy link
Member

@aleclarson aleclarson commented Aug 15, 2024

Tip

The owner of this PR can publish a preview release by commenting /publish in this PR. Afterwards, anyone can try it out by running pnpm add radashi@pr<PR_NUMBER>.

Summary

Add isError type guard that checks if Object.prototype.toString result equals "[object Error]".

For any code change,

  • Related documentation has been updated, if needed
  • Related tests have been added or updated, if needed

Does this PR introduce a breaking change?

No

Bundle impact

Status File Size 1
A src/typed/isError.ts 126

Footnotes

  1. Function size includes the import dependencies of the function.

@aleclarson aleclarson merged commit c772099 into main Aug 15, 2024
8 checks passed
@aleclarson aleclarson deleted the feat/isError-fn branch August 15, 2024 23:53
Copy link

A new beta version 12.2.0-beta.6b76988 has been published to NPM. 🚀

To install:

pnpm add radashi@12.2.0-beta.6b76988

The radashi@beta tag also includes this PR.

See the changes

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 this pull request may close these issues.

1 participant