LinusU / LinusU/base32-decode

Unnecessary octet-masking

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
9
Forks
4
PR merge metrics
No merged PRs in 30d

Description

# Unnecessary `& 255`

https://github.com/LinusU/base32-decode/blob/fa61c01bc0bbd963a1abcf86cc519f09d70b09e0/index.js#L49

Assignment of `Uint8Array` elements only takes the least significant octet. Unlike `Uint8ClampedArray`, it does not clamp the value; it truncates.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at index.js line 49, as linked in the issue, and inspect the surrounding Uint8Array assignment. Run the existing test suite before and after the focused change; done means the unnecessary masking is removed without changing decoder behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Refactor
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.