npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

car-parking-formio

v1.0.1

Published

Coding Exercise For Candidates

Downloads

3

Readme

coding-exercise

Coding Exercise For Candidates

Car Park Management System Coding Exercise

Task Description:

You are tasked with building a simple car park management system in Node.js using TypeScript. The system should allow users to add cars to the car park, remove cars from the car park, and list all cars currently parked. You have one hour to complete the task. Focus on implementing the core functionalities first, and then consider additional features if time allows.

Requirements:

  • Use TypeScript for the implementation.
  • Implement the following functionalities:
    1. Add Car: Allow users to add cars to the car park. Each car should have a unique registration number and a color.
    2. Remove Car: Allow users to remove a car from the car park based on its registration number.
    3. List Cars: Display a list of all cars currently parked in the car park, showing their registration numbers and colors.
  • Ensure error handling for invalid inputs and edge cases.
  • Write clean and maintainable code with proper documentation and comments.

Instructions:

  1. Fork Repository: Fork the provided repository to your GitHub account.
  2. Setup: Clone the forked repository and set up a new Node.js project with TypeScript.
  3. Implementation:
    • Define a Car class with properties for registration number and color.
    • Implement a CarPark class with methods for adding cars, removing cars, and listing cars.
  4. User Interaction:
    • Use command-line interface (CLI) or stdin for user input.
    • Allow users to interactively add, remove, and list cars.
  5. Error Handling:
    • Handle invalid inputs such as duplicate registration numbers or removing non-existent cars.
  6. Testing:
    • Write tests to ensure the implemented functionalities work correctly.
  7. Documentation:
    • Provide comments and documentation to explain your code's logic and any algorithms used.
  8. Completion:
    • Aim to complete the core functionalities within one hour.
    • If you finish early, consider adding optimizations or additional features.

Submission:

  • Commit your changes to your forked repository.
  • Submit your solution sharing the link of your forked repository via Linkedin.
  • Include any necessary instructions for running the program.
  • Provide a brief explanation of your design choices and any trade-offs made.

Note:

  • Focus on completing the core functionalities within the given time frame.
  • Write clean, understandable code with proper error handling and documentation.
  • Test your program with various scenarios to ensure it works correctly.
  • Good luck, and feel free to ask any questions if you need clarification!