Skip to content

[jest-get-type] Simplify checking for primitive#8416

Merged
scotthovestadt merged 2 commits intojestjs:masterfrom
Connormiha:simplify-is-primitive
May 4, 2019
Merged

[jest-get-type] Simplify checking for primitive#8416
scotthovestadt merged 2 commits intojestjs:masterfrom
Connormiha:simplify-is-primitive

Conversation

@Connormiha
Copy link
Copy Markdown
Contributor

Summary

I just simplified checking for primitive type and improve performance.

Test plan

There were already tests, but I added some more

@codecov-io
Copy link
Copy Markdown

codecov-io commented May 3, 2019

Codecov Report

Merging #8416 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8416      +/-   ##
==========================================
- Coverage   62.32%   62.32%   -0.01%     
==========================================
  Files         266      266              
  Lines       10734    10733       -1     
  Branches     2615     2614       -1     
==========================================
- Hits         6690     6689       -1     
  Misses       3461     3461              
  Partials      583      583
Impacted Files Coverage Δ
packages/jest-get-type/src/index.ts 89.65% <100%> (-0.35%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13bf7c7...1ec9cbc. Read the comment docs.

@scotthovestadt
Copy link
Copy Markdown
Contributor

Benchmarks on perf?

@Connormiha
Copy link
Copy Markdown
Contributor Author

https://jsperf.com/jest-get-type-is-primitive

Copy link
Copy Markdown
Collaborator

@jeysal jeysal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's actually a quite beautiful way of doing it 👌

Copy link
Copy Markdown
Contributor

@scotthovestadt scotthovestadt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elegant solution.

Change log please.

@github-actions
Copy link
Copy Markdown

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants