Skip to content

ageay59/simple-node-cli

Repository files navigation

JavaScript Developer Test - CLI Filter & Count Tool

A Node.js command-line interface for filtering and counting nested data structures containing Countries, People, and Animals.

  • No external libraries (except testing framework)
  • Comprehensive test coverage
  • Clean, readable, and maintainable code structure
  • Git repository ready

Features

  • Filter Mode: Filter animals by name pattern
  • Count Mode: Add children count annotations

Installation

# Install dependencies
npm install

Usage

Filter Command

  • ✅ Filter animals containing a specific pattern in their names
  • ✅ Original order is preserved at all levels (countries, people, animals)
  • ✅ Parents are removed if all children are filtered out
node app.js --filter=ry

Count Command

  • ✅ Add count information to names showing number of children:
node app.js --count

Running Tests

  • [Data] - Data validation tests
  • [BR] - Business Rule tests
# Run all tests
npx jest

License

This project is created as a technical assessment and is intended for evaluation purposes.

About

Node CLI for tech assessment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published