Remove any space between storage area and storage keys
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 10.5k
- Forks
- 564
- PR merge metrics
- No merged PRs in 30d
Description
Feature Request
I just spent more than an hour, trying to understand why:
await storage.getItem('local: MyKeys');
return null, even though 'MyKeys' does exist when i checked the storage from the browser's devtool. It turns out i just set the key without the space:
await storage.setItem('local:MyKeys', MyValues);
This can be hard to spot since in the devtool, the space at the start of the key is trimmed, so 'MyKeys' and ' MyKeys' appear the same in there.
Is your feature request related to a bug?
N/A
What are the alternatives?
Just mention it in the documentation for the time being i guess?
Contributor guide
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 by tracing the storage.getItem and storage.setItem entry points and how the storage area and key are parsed. Use the two example calls as a behavioral check, then update the relevant implementation, tests, or documentation so whitespace handling is explicit and the reported mismatch is addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100