mathiasbynens / mathiasbynens/rot
misleading undefined behavior
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
When calling rot(someUndefinedValue) we get 'haqrsvarq' (value of rot('undefined')), which to me was quite misleading. I feel like if the value passed to rot is not truthy, it should return either that value or consistently null/undefined/''.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the library entry point for rot and reproduce the behavior with an undefined value, comparing it with rot('undefined'). Review the existing handling of falsy inputs and choose a consistent return behavior based on the issue discussion; done means undefined input no longer produces the encoded string and the behavior is covered by a regression check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100