Ling-Assessment is a project designed to help users find and rank people based on the number of bananas they have. The main functionality includes searching for a user and displaying the top 10 users with the highest banana counts, with various sorting options and error handling.
- Search for a user by name
- Display a ranked list of the top 10 users with the most bananas
- Highlight the searched user in the list
- Error handling for non-existent users
- Sorting options by name and rank
- Fuzzy search capability
To install and set up this project, follow these steps:
- Clone the repository:
git clone https://github.com/nafisholeh/ling-assessment.git
- Navigate to the project directory:
cd ling-assessment
- Install the necessary dependencies:
npm install
To use this project, follow these steps:
- Start the project using Expo:
npx expo start
- Follow the command listed on the output to run on iOS simulator by pressing
i
or Android simulator by pressinga
.
- Input the user name in the search field and click the search button.
- The app will render a list of the 10 people with the most bananas, including:
- Name
- Rank (1 for the highest number of bananas, 2 for the second-highest, etc.)
- The number of bananas
- The searched user will be highlighted in the list.
- If the searched user does not exist, an error message will be shown: “This user name does not exist! Please specify an existing user name!”.
- If the searched user has enough bananas to appear in the top 10, they will be included in the list. If not, they will replace the last rank of the top 10 list and their true rank will be displayed.
- Options to sort the list by name and rank are available.
- An option to show the lowest ranked users, with users having the same score listed alphabetically, is available.
- Fuzzy search allows the user to search by partial name, showing usernames that match the criteria and sorting them by highest to lowest ranked users.
We welcome contributions to Ling-Assessment! Please follow these guidelines:
- Fork the repository.
- Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-name
- Commit your changes:
git commit -m "Describe your changes"
- Push to the branch:
git push origin feature/your-feature-name
- Create a pull request.
This project is licensed under the MIT License.