Add a Number Base Converter tool
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Add a tool that converts integers between binary, octal, decimal and hex (and any base from 2 to 36), and shows two's complement for a chosen bit width. Developers do this all the time, and none of our tools cover it. The Base64 "Encodings" tab only shows the hex of text bytes.
Scope
- Route
/number-base-converter. Registry: title "Number Base Converter", tagline "Numbers",heroDim: "", features like["Binary", "Octal", "Decimal", "Hex", "Two's complement"] lib/number-base.tsusingBigIntonly:parseInteger(input, base?): handles a sign, detects0b,0oand0x, and accepts_or spaces as separators. Errors say which character is wrong and where.formatInteger(value, base, { uppercase, groupSize })for bases 2 to 36toTwosComplement(value, bits)andfromTwosComplement(...)for 8, 16, 32 and 64 bits
- UI: one input with a base select, outputs for 2, 8, 10 and 16 with Copy buttons, a custom base, and a bit-width select.
app/(tools)/base64/is a good structure to copy.
Acceptance criteria
- Tests in
lib/__tests__/number-base.test.ts:"0xff"gives255n,"1111_1111"in base 2 gives255n,"-0b1010"gives-10n,"18446744073709551616"gives hex10000000000000000exactly,"0b102"gives an error that names2,"zz"in base 36 gives1295n,toTwosComplement(-1n, 8)gives11111111, andtoTwosComplement(128n, 8)gives an error - Nothing goes through
NumberorparseInt, so there's no precision loss above 2^53 - The standard new-tool checklist below is complete
Standard new-tool checklist
Everything (home grid, metadata, JSON-LD, OG image, sitemap, manifest, command palette) is driven by the registry in lib/tools.ts, so a new tool is mostly one registry entry plus a route.
- Add an entry to
TOOLSinlib/tools.tsfilling every field of theToolinterface (lib/tools.ts:19-50). UseapplicationCategory: "DeveloperApplication", reuse theCTA_PROJECTS/CTA_CONTACTconstants for the CTA links, and setsitemapPriority: 0.9like the other tools. - Pick
accentVarfrom the six theme variables inapp/globals.css(--cyan,--amber,--rose,--violet,--sky,--lime;--cyanand--rosearen't used by any tool yet) and setaccentHexto that variable's dark-theme value.heroDimmust be""or a substring ofheroHeading. - Write 3 or 4 FAQs (3 renders as a 3-column grid, see
components/shared/ToolPageLayout.tsx:25). KeepmetaTitleunder 60 characters andmetaDescriptionaround 150 to 160. - Keep
featuresandogDescriptionto plain Latin text and punctuation. The social card font is a subset with no arrow or symbol glyphs (lib/og.tsx:33-36). - Create
app/(tools)/<slug>/page.tsx,<Name>Client.tsx(with"use client"), andopengraph-image.tsx. Copypage.tsxandopengraph-image.tsxfromapp/(tools)/base64/and change the slug. - Put all pure logic in
lib/<name>.ts(no React, no DOM) with tests inlib/__tests__/<name>.test.ts. Tests can import with@/like the app does (vitest.config.tshas the alias). - Nothing leaves the browser: no network calls with user input, no analytics, no third-party scripts (the CSP in
middleware.tsblocks external scripts anyway). - Reuse shared pieces:
CopyButton,useToast, and optionallyuseRegisterCommandsfor command palette actions (example inapp/(tools)/base64/Base64Client.tsx:43-53). - Every input has a visible label or an
aria-label, the tool works with the keyboard alone, and it looks right in both light and dark themes. - Add the tool to the "Which tool?" dropdown in
.github/ISSUE_TEMPLATE/bug_report.yml. -
npm run lint && npm run test && npm run buildpasses.
One new tool per contributor, so more people get a chance. Add your registry entry at the end of TOOLS and rebase on develop before asking for review, since other new tools will touch the same file.
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off develop, and open your PR against develop with Closes #128 in the description.
- Lenguaje dominante
- TypeScript
- Estrellas
- 1
- Forks
- 9
- Merge medio
- 10 h 41 min
- PR fusionados (30 d)
- 85
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de codercops/toolbelt
-
JSON to XML: one root element for top-level arrays, and keep empty and nested arraysPosiblemente ocupada @anurag2787 la tomó hace 1 día. Abiertobug good first issue hacktoberfest
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
codercops/toolbelt#204 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Stop the JSON formatter's Find bar from typing into the JSONPosiblemente ocupada @kudala-bharani la tomó hace 1 día. Abiertobug hacktoberfest help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
codercops/toolbelt#121 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Set up component tests with happy-dom and Testing LibraryPosiblemente ocupada @Bl1ckxy la tomó hace 1 día. Abiertoenhancement hacktoberfest help wanted testing
Dificultad 3/5 1-2 días Aptitud para principiantes 67/100
codercops/toolbelt#206 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug good first issue hacktoberfest
Dificultad 3/5 1-2 días Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Light theme pages throw a hydration error from the theme togglePosiblemente ocupada @anurag2787 la tomó hace 1 día. Abiertobug good first issue hacktoberfest
Dificultad 3/5 1-2 días Aptitud para principiantes 82/100
codercops/toolbelt#193 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de codercops/toolbelt
Issues similares
-
fix(cursor): align Grok 4.7 context window to 256k/500k and drop unsupported max effort tierAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
diegosouzapw/OmniRoute#17386 ·
Los mantenedores suelen responder en 1 día
-
ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
area/dashboard kind/bug kind/bug-qa QA/dev-automation
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
vybestack/llxprt-code#3917 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
api-parity
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
IBM/carbon-components-ember#1157 ·
Los mantenedores suelen responder en 1 día