mathiasbynens / mathiasbynens/rot

misleading undefined behavior

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

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

  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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.