This repository contains solutions for Node.js Fundamentals assignment. The assignment covers various Node.js core APIs including File System, CLI, Modules, Hash, Streams, Zlib, Worker Threads, and Child Processes.
-
Fork this repository
Click the "Fork" button at the top right of this page: https://github.com/AlreadyBored/node-nodejs-fundamentals
-
Clone your fork
git clone https://github.com/YOUR_USERNAME/node-nodejs-fundamentals.git cd node-nodejs-fundamentals -
Install dependencies (if any added in the future)
npm install
-
Start implementing the tasks
Each file in the
src/directory contains a function template with comments describing what needs to be implemented.
- Node.js version: >=24.10.0
- npm version: >=10.9.2
- No external libraries allowed
npm run fs:snapshot- Create snapshot of workspace directorynpm run fs:restore- Restore directory structure from snapshotnpm run fs:findByExt- Find files by extension in workspacenpm run fs:merge- Merge .txt files from workspace/partsnpm run fs:merge -- --files a.txt,b.txt,c.txt- Merge specific files from workspace/parts in provided order
Snapshot format reminder:
{
"rootPath": "/absolute/path/to/workspace",
"entries": [
{ "path": "file1.txt", "type": "file", "size": 1024, "content": "base64" },
{ "path": "nested", "type": "directory" }
]
}entries[].path values must be relative to workspace.
npm run cli:interactive- Interactive command-line interfacenpm run cli:progress- Display progress bar
npm run modules:dynamic- Dynamic plugin loading
npm run hash:verify- Verify file checksums using SHA256
npm run streams:lineNumberer- Add line numbers to stdin inputnpm run streams:filter- Filter stdin lines by patternnpm run streams:split- Split file into chunks
npm run zip:compressDir- Compress directory to .br archivenpm run zip:decompressDir- Decompress .br archive
npm run wt:main- Parallel sorting with worker threads
npm run cp:execCommand- Execute command in child process
- Implement all the required functionality in the corresponding files
- Test your solutions using the npm scripts provided
- Commit your changes to your forked repository
- Submit the link to your repository for review