Essential session storage is required to sign in. Optional analytics remain off unless you allow them.
Build a small reusable library that genuinely exercises the hard parts of JavaScript: e.g. an event emitter (on/emit/off using closures for private state), a tiny reactive store, or a promise-based task queue with bounded concurrency. Demonstrate correct use of closures for encapsulation, prototypes/this (or class sugar) for the public API, and async control flow (promises/async-await). Ship tests proving behavior, including an async edge case.
Private state is genuinely encapsulated via closures (or #fields); no leaking internals; no shared-mutable-state bugs.
this is bound correctly (no lost-this callback bugs); the public API uses prototypes/class sugar appropriately.
Promises/async-await used correctly (ordering, concurrency bound, error propagation); no swallowed rejections.
Tests cover behavior including at least one async edge case (e.g. rejection, ordering, or concurrency limit).
Use this README structure to make the work reviewable.
DevPath fetches a read-only, size-capped snapshot. Submitted code is never executed.
# A small utility library: closures, prototypes & async ## Goal Build a small reusable library that genuinely exercises the hard parts of JavaScript: e.g. an event emitter (on/emit/off using closures for private state), a tiny reactive store, or a promise-based task queue with bounded concurrency. Demonstrate correct use of closures for encapsulation, prototypes/this (or class sugar) for the public API, and async control flow (promises/async-await). Ship tests proving behavior, including an async edge case. ## Acceptance criteria - [ ] Closures & encapsulation: Private state is genuinely encapsulated via closures (or #fields); no leaking internals; no shared-mutable-state bugs. - [ ] this / prototypes: this is bound correctly (no lost-this callback bugs); the public API uses prototypes/class sugar appropriately. - [ ] Async control flow: Promises/async-await used correctly (ordering, concurrency bound, error propagation); no swallowed rejections. - [ ] Tests: Tests cover behavior including at least one async edge case (e.g. rejection, ordering, or concurrency limit). ## Verification - [ ] Document installation and run commands. - [ ] Record automated checks and their exact commands. - [ ] Add representative output, screenshots, or a short demo where useful. - [ ] Confirm failure paths and known constraints. ## Decision log ### Decision title - Context: - Choice: - Alternatives considered: - Tradeoffs: ## Evidence - Link each rubric criterion to the file, test, or artifact that demonstrates it. ## Known limitations - List what is intentionally out of scope and what should be improved next.