Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
with:
node-version: 20
- run: npm ci
#- run: npm test

publish-npm:
needs: build
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: PR Tests

on:
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test
38 changes: 0 additions & 38 deletions .github/workflows/tag-creation.yml

This file was deleted.

6 changes: 3 additions & 3 deletions lib/utils/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ type FilterValue = string | number | boolean | string[] | number[];
* @param key The key to filter by.
* @param filter The value to filter by. This can be a single value or an array of values.
* It also supports a function that takes the value of the key and returns a boolean.
* @param mode The mode of filtering. 'strict' checks for exact matches, while 'loose' allows for partial matches.
* Only applies to array filter values.
* This is ignored if custom filter function is provided.
* @param strict When set to true (default), checks for exact matches between arrays.
* This only applies if both the `filter` and the key's value are arrays.
* Ignored if a custom filter function is provided or if `filter` is not an array.
* @returns A new array of objects that match the specified key-value pair.
*/
export const filterByKeyValue = <T extends TObject>(
Expand Down