Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Duplicated code

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

Nobody has claimed this yet.

Assessment

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

Research direction

Start by reading dom.js lines 27-56 and the linked duplication guidance. Refactor the duplicated code in that range without changing behavior; done means the repeated logic is consolidated and the existing behavior remains covered by the repository's tests.

Written by the indexing model from the issue text.

Description

See here: https://github.com/ryanmcdermott/clean-code-javascript#remove-duplicate-code for explanation on why it is bad to duplicate code.

The code here: https://github.com/fac-14/NDJS-API/blob/master/dom.js#L27-L56 has some dupliation and can be refactored.

(Sorry, I know you guys had a lot to do in a short period of time).

Dominant language
JavaScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from fac-14/NDJS-API

All issues in fac-14/NDJS-API

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.