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

refactor(word): cleanup filter-word-list-by-length.ts #3262

Merged
merged 2 commits into from
Nov 21, 2024

Conversation

ST-DDT
Copy link
Member

@ST-DDT ST-DDT commented Nov 14, 2024

Cleanup some long forgotten code in the words module.

The first part was not used because we shipped TS4 at that time.
The later now uses an explicit nullish check instead of a falsy check.

Is this a chore or a refactor?

Found while looking at: #3261

@ST-DDT ST-DDT added c: chore PR that doesn't affect the runtime behavior p: 1-normal Nothing urgent m: word Something is referring to the word module labels Nov 14, 2024
@ST-DDT ST-DDT added this to the vAnytime milestone Nov 14, 2024
@ST-DDT ST-DDT requested review from a team November 14, 2024 11:43
@ST-DDT ST-DDT self-assigned this Nov 14, 2024
Copy link

netlify bot commented Nov 14, 2024

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit 02348a3
🔍 Latest deploy log https://app.netlify.com/sites/fakerjs/deploys/673c7fa1cee82700086a77e7
😎 Deploy Preview https://deploy-preview-3262.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.96%. Comparing base (b0a5ad3) to head (02348a3).
Report is 3 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3262   +/-   ##
=======================================
  Coverage   99.96%   99.96%           
=======================================
  Files        2806     2806           
  Lines      217156   217156           
  Branches      976      975    -1     
=======================================
+ Hits       217075   217078    +3     
+ Misses         81       78    -3     
Files with missing lines Coverage Δ
src/modules/word/filter-word-list-by-length.ts 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

---- 🚨 Try these New Features:

@Shinigami92
Copy link
Member

It's a refactor if length was previously explicitly checked against 0

@ST-DDT ST-DDT changed the title chore(word): cleanup word filtering refactor(word): cleanup filter-word-list-by-length Nov 14, 2024
@ST-DDT ST-DDT changed the title refactor(word): cleanup filter-word-list-by-length refactor(word): cleanup filter-word-list-by-length.ts Nov 14, 2024
@ST-DDT ST-DDT added this pull request to the merge queue Nov 21, 2024
Merged via the queue into next with commit 382c034 Nov 21, 2024
23 checks passed
@ST-DDT ST-DDT deleted the refactor/word/filter-by-length branch November 21, 2024 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: chore PR that doesn't affect the runtime behavior m: word Something is referring to the word module p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants