lukeed / lukeed/worktop

Add a Reverse of STATUS_CODES

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

Nobody has claimed this yet.

feedback wanted
Dominant language
TypeScript
Stars
1.7k
Forks
41
PR merge metrics
No merged PRs in 30d

Description

Hi, love the library, using it in my blog, works like a charm 😃

I got a feature request to make. Currently, there's the `STATUS_CODES` constant. What I am suggesting is something that is revers of that. So, by typing `CODES`, then `.`, we'd get intellisense for all the status code messages. This will help people who don't have the codes memorized. Intellisense will remove Googling/Remembering the exact codes out of the equation entirely.

Where to use:

![image](https://user-images.githubusercontent.com/47742487/139259470-f41dfb36-17d7-4313-b55d-60d410eb94cc.png)

Here, I can replace `422` with `CODES['Unprocessable Entity']`. This will remove mental overhead while reading the code too :)

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

Locate the existing STATUS_CODES constant in the TypeScript project and inspect how its values are exposed. Determine the appropriate place for a reverse CODES mapping, then verify that names such as 'Unprocessable Entity' provide the corresponding numeric status code and editor-friendly access.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.