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 RedisKvs.scan result parsing #1720

Merged
merged 1 commit into from
Jan 9, 2023
Merged

Conversation

uriesk
Copy link
Collaborator

@uriesk uriesk commented Jan 8, 2023

Follow up to #1714

just makes the

const items = Array.from(data, (x, k) => k % 2 ? undefined : [x, data[k + 1]]).filter((x) => x);
const parsedItems: KVS<T> = items.reduce((acc, [key, strVal]) => {
  return {
    ...acc,
    [key]: this.mapKeysGet(JSON.parse(strVal)),
  };
}, {} as KVS<T>);

more readable.
I forgot to do that in the old commit.

@codecov
Copy link

codecov bot commented Jan 8, 2023

Codecov Report

Base: 68.98% // Head: 68.96% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (e10d600) compared to base (6fb1e71).
Patch coverage: 75.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1720      +/-   ##
==========================================
- Coverage   68.98%   68.96%   -0.02%     
==========================================
  Files          26       26              
  Lines        2431     2436       +5     
  Branches      477      477              
==========================================
+ Hits         1677     1680       +3     
- Misses        589      591       +2     
  Partials      165      165              
Impacted Files Coverage Δ
src/util/RedisKvs.ts 73.91% <75.00%> (-0.53%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@kelson42 kelson42 added this to the 1.12.0 milestone Jan 8, 2023
@kelson42 kelson42 merged commit f7383f8 into openzim:main Jan 9, 2023
@uriesk uriesk deleted the refactorscan branch January 10, 2023 09:33
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.

3 participants