Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes enhance the code's robustness, usability, and maintainability while ensuring it can handle more complex data structures effectively. #297 #296

Closed
wants to merge 6 commits into from

Conversation

Unnati-Gupta24
Copy link

@Unnati-Gupta24 Unnati-Gupta24 commented Oct 4, 2024

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Closes #297.

Please open a new issue if there isn't an existing issue yet.

Description of Changes

  1. Error Handling:
    Replaced console.error with throw new Error(...) for better error management.

  2. Input Validation:
    Added a validateNodes method to ensure input data is valid before processing.

  3. Performance Optimization:
    Used a Set in arrayDeduplication for tracking duplicates instead of an array.

  4. Support for Nested Properties:
    Enhanced arrayDeduplication to handle nested properties using dot notation via getValueByPath.

  5. Custom Key Generation:
    Allowed users to provide a custom key generation function in arrayDeduplication.

  6. Documentation Improvements:
    Updated JSDoc comments for clarity and added examples where appropriate.

Screenshot

Please include any relevant screenshots.

Screenshot

Please include any relevant screenshots.

@Unnati-Gupta24 Unnati-Gupta24 changed the title Changes enhance the code's robustness, usability, and maintainability while ensuring it can handle more complex data structures effectively. Changes enhance the code's robustness, usability, and maintainability while ensuring it can handle more complex data structures effectively. #<297> Oct 4, 2024
@nemesifier nemesifier changed the title Changes enhance the code's robustness, usability, and maintainability while ensuring it can handle more complex data structures effectively. #<297> Changes enhance the code's robustness, usability, and maintainability while ensuring it can handle more complex data structures effectively. #297 Nov 28, 2024
@Unnati-Gupta24
Copy link
Author

@nemesifier please review this pr and the changes i have enhanced code robustness to handle heavy data effectively

@Unnati-Gupta24 Unnati-Gupta24 closed this by deleting the head repository Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in arrayDeduplication Function with Nested Properties in Test folder in NetjsonWorker file
1 participant