Skip to content

Filter Utility Updates & Tests#8

Merged
Feresaul merged 5 commits intomainfrom
filter
May 9, 2025
Merged

Filter Utility Updates & Tests#8
Feresaul merged 5 commits intomainfrom
filter

Conversation

@Feresaul
Copy link
Copy Markdown
Owner

@Feresaul Feresaul commented May 9, 2025

No description provided.

@Feresaul Feresaul requested a review from Copilot May 9, 2025 00:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the filter utility and adds comprehensive tests for filtering functions while revising the documentation to reflect the changes.

  • Updated the getKeyValue import path in tests/value.test.ts.
  • Added new tests for filterByKeyValue in tests/filter.test.ts covering various filter scenarios.
  • Introduced a runtime check for the first argument in filterByKeyValue and updated the README formatting.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
tests/value.test.ts Updated import for getKeyValue to point to the new module location.
tests/filter.test.ts Added extensive tests for the filterByKeyValue utility function.
lib/utils/filter.ts Added runtime type checking for the list parameter and refined filter logic.
README.md Revised documentation and formatting for clarity.
Comments suppressed due to low confidence (2)

tests/value.test.ts:3

  • Verify that the updated import path for getKeyValue correctly reflects the intended module relocation and that all related dependencies are updated accordingly.
import { getKeyValue } from '../lib/utils/value';

lib/utils/filter.ts:25

  • [nitpick] Since list is statically typed as an array, consider whether this runtime type check is necessary; if unexpected types might be passed, throwing an error could improve clarity and maintainability.
if (!Array.isArray(list)) {

Feresaul added 2 commits May 8, 2025 18:17
…lue function; implement tests for filterByKeyValue and getKeyValue functions
…terByKeyValue function when the first argument is not an array
@Feresaul Feresaul requested a review from Copilot May 9, 2025 00:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Filter Utility by revising import paths, adding comprehensive tests, and adjusting export paths and documentation to better reflect the current TypeScript implementation.

  • Updated getKeyValue import in tests to use the new utility path.
  • Added extensive test cases for filterByKeyValue in tests/filter.test.ts.
  • Modified package.json and README.md to reflect the new library structure and exports.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/value.test.ts Updated the getKeyValue import to point to the new utility module.
tests/filter.test.ts Added new tests covering various filterByKeyValue scenarios.
package.json Revised export paths and files list to use the new lib folder.
lib/utils/filter.ts Adjusted strict mode logic for filterByKeyValue for non-array values.
README.md Updated documentation to align with the library restructuring.
Comments suppressed due to low confidence (1)

package.json:30

  • Verify that updating the export paths from built files to source TypeScript files is intentional and will not disrupt package consumers who rely on the previous distribution format.
"default": "./lib/index.ts",

…e function to ensure the first argument is an array; adjust package.json and tsconfig.json for proper module exports and compilation settings.
@Feresaul Feresaul merged commit d63c415 into main May 9, 2025
@Feresaul Feresaul deleted the filter branch May 9, 2025 00:27
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.

2 participants