MCPcopy Index your code
hub / github.com/exercism/javascript

github.com/exercism/javascript @v3.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.0.0 ↗ · + Follow
581 symbols 1,121 edges 421 files 24 documented · 4%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

JavaScript

configlet javascript / master

Exercism exercises in JavaScript

This is the JavaScript track, one of the many tracks on Exercism. It holds all the exercises that are currently implemented and available for students to complete. The track consists of various core exercises - the ones a student must complete - and each core exercise may unlock various side exercises. You can find this in the config.json.

In version 3 of Exercism, the above no longer holds. See the exercism/v3 repository for more information.

Tools

See CONTRIBUTING.md for a list of requirements to contribute to this track. It also has a list of tools you can use, of which the test tool is one of them.

Running the code quality tooling (linter)

This run eslint for all files that require linting.

npx eslint exercises/**/*.spec.js exercises/**/.meta/*.js --fix

These are also the files that are linted using the lint script, mentioned in CONTRIBUTING.md. The lint rules imposed on contributors and maintainers are stricter than those for the student. The idea is that we do not impose style rules on the students, but we guard for (potential) errors.

Files with strict rules:

  • <slug>.spec.js
  • .meta/proof.ci.js
  • .meta/exemplar.js

Files with loose rules:

  • custom.spec.js
  • <slug>.js

Running the test suite

This runs jest tests for all sample solutions. This does not use the regular way to run jest, because the example solution files must be renamed to be imported correctly into the test files.

npx babel-node scripts/test

If the ASSIGNMENT environment variable is set, only that exercise is tested. For example, if you only want to test the example.js for the practice exercise two-fer, you may, depending on your environment, use:

ASSIGNMENT=practice/two-fer npx babel-node scripts/test

Running on Windows? Depending on your shell, environment variables are set differently. You can use cross-env to normalize this. The following should work across environments:

bash npx cross-env ASSIGNMENT=practice/two-fer babel-node scripts/test

Related repositories

Related TypeScript repositories

A lot of the improvements made to this track and tooling, is also made to the TypeScript track and tooling and vice-versa.

Extension points exported contracts — how you extend this code

ExternalApi (Interface)
* These are the shapes of the external service', the return values and the * functions. Don't change these. In various
exercises/concept/translation-service/global.d.ts
Translation (Interface)
(no doc)
exercises/concept/translation-service/global.d.ts
CheckStatus (Interface)
(no doc)
exercises/concept/fruit-picker/global.d.ts
CheckInventory (Interface)
(no doc)
exercises/concept/fruit-picker/global.d.ts

Core symbols most depended-on inside this repo

meetup
called by 95
exercises/practice/meetup/meetup.js
evaluate
called by 64
exercises/practice/forth/forth.js
toString
called by 50
exercises/practice/clock/clock.js
push
called by 45
exercises/practice/linked-list/linked-list.js
allergicTo
called by 40
exercises/practice/allergies/allergies.js
roll
called by 37
exercises/practice/bowling/bowling.js
score
called by 28
exercises/practice/yacht/yacht.js
register
called by 26
exercises/concept/translation-service/api.js

Shape

Function 221
Method 214
Class 142
Interface 4

Languages

TypeScript100%

Modules by API surface

exercises/concept/poetry-club-door-policy/door-policy.spec.js19 symbols
scripts/helpers.js18 symbols
exercises/practice/simple-linked-list/simple-linked-list.js13 symbols
exercises/practice/circular-buffer/circular-buffer.js13 symbols
exercises/concept/translation-service/service.js13 symbols
exercises/practice/zipper/zipper.js12 symbols
exercises/practice/react/react.js12 symbols
exercises/practice/custom-set/custom-set.js12 symbols
exercises/practice/complex-numbers/complex-numbers.js12 symbols
exercises/practice/rational-numbers/rational-numbers.js11 symbols
exercises/practice/list-ops/list-ops.js11 symbols
exercises/practice/dnd-character/dnd-character.js11 symbols

For agents

$ claude mcp add javascript \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact