-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(deps): update all non-major dependencies (#91)
* chore(deps): update all non-major dependencies * fix: type error after upgrade typescript@5.1 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: thundermiracle <cissoliu@gmail.com>
- Loading branch information
1 parent
9df64cf
commit 598f2bf
Showing
28 changed files
with
1,082 additions
and
877 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
'filter-data': patch | ||
--- | ||
|
||
Updated dependency `ramda` to `0.29.0`. | ||
Updated dependency `@rollup/plugin-node-resolve` to `^15.1.0`. | ||
Updated dependency `@types/node` to `^18.16.17`. | ||
Updated dependency `@types/ramda` to `^0.29.2`. | ||
Updated dependency `@web-configs/eslint-plugin` to `^0.5.1`. | ||
Updated dependency `rimraf` to `^5.0.1`. | ||
Updated dependency `tslib` to `^2.5.3`. | ||
Updated dependency `tsx` to `^3.12.7`. | ||
Updated dependency `typescript` to `^5.1.3`. |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { FilterDataOption, SearchConditionMultiple } from './lib/types'; | ||
/** | ||
* | ||
* @param {*array} allData: Array of object | ||
* @param {*array} searchConditions | ||
* @param {*object} optionsIn: { caseSensitive: false, includeNull: false, offset: undefined, limit: undefined } | ||
*/ | ||
declare function filterData<T>(allData: ReadonlyArray<T>, searchConditions: SearchConditionMultiple[], optionsIn?: FilterDataOption): T[]; | ||
export default filterData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import type { FilterFunction } from '../lib/types'; | ||
/** | ||
* equal check for data | ||
* | ||
* @param {*object} searchCondition: { name, value } | ||
* @param {*boolean} caseSensitive: false | ||
* @param {*DataObject} data | ||
*/ | ||
declare const equal: FilterFunction; | ||
export default equal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import SearchType from '../lib/SearchType'; | ||
import type { FilterFunction } from '../lib/types'; | ||
declare const filtersMap: Record<SearchType, FilterFunction>; | ||
export default filtersMap; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import type { FilterFunction } from '../lib/types'; | ||
/** | ||
* greater check for data | ||
* | ||
* @param {*object} searchCondition: { name, value } | ||
* @param {*boolean} caseSensitive: false | ||
* @param {*DataObject} data | ||
*/ | ||
declare const greater: FilterFunction; | ||
export default greater; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* greater or equal check for data | ||
* | ||
* @param {*object} searchCondition: { name, value } | ||
* @param {*boolean} caseSensitive: false | ||
* @param {*DataObject} data | ||
*/ | ||
declare const greaterOrEqual: import("ts-toolbelt/out/Function/Curry").Curry<(searchCondition: import("../lib/types").SearchCondition, caseSensitive: boolean, data: import("../lib/types").DataObject) => boolean>; | ||
export default greaterOrEqual; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './filtersMap'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* less check for data | ||
* | ||
* @param {*object} searchCondition: { name, value } | ||
* @param {*boolean} caseSensitive: false | ||
* @param {*DataObject} data | ||
*/ | ||
declare const less: import("ts-toolbelt/out/Function/Curry").Curry<(searchCondition: import("../lib/types").SearchCondition, caseSensitive: boolean, data: import("../lib/types").DataObject) => boolean>; | ||
export default less; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* less or equal check for data | ||
* | ||
* @param {*object} searchCondition: { name, value } | ||
* @param {*boolean} caseSensitive: false | ||
* @param {*DataObject} data | ||
*/ | ||
declare const lessOrEqual: import("ts-toolbelt/out/Function/Curry").Curry<(searchCondition: import("../lib/types").SearchCondition, caseSensitive: boolean, data: import("../lib/types").DataObject) => boolean>; | ||
export default lessOrEqual; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import type { SearchCondition, DataObject } from '../lib/types'; | ||
/** | ||
* like check for data | ||
* | ||
* @param {*object} searchCondition: { name, value } | ||
* @param {*boolean} caseSensitive: false | ||
* @param {*DataObject} data | ||
*/ | ||
declare const like: (searchCondition: SearchCondition, caseSensitive: boolean, data: DataObject) => boolean; | ||
export default like; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* not equal check for data | ||
* | ||
* @param {*object} searchCondition: { name, value } | ||
* @param {*boolean} caseSensitive: false | ||
* @param {*DataObject} data | ||
*/ | ||
declare const notEqual: (conditions: import("../lib/types").SearchCondition, caseSensitive: boolean, data: import("../lib/types").DataObject) => boolean; | ||
export default notEqual; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** | ||
* not like check for data | ||
* | ||
* @param {*object} searchCondition: { name, value } | ||
* @param {*boolean} caseSensitive: false | ||
* @param {*DataObject} data | ||
*/ | ||
declare const notLike: import("ts-toolbelt/out/Function/Curry").Curry<(searchCondition: import("../lib/types").SearchCondition, caseSensitive: boolean, data: import("../lib/types").DataObject) => boolean>; | ||
export default notLike; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { default as SearchType } from './lib/SearchType'; | ||
export { default as filterData } from './filterData'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
declare enum SearchType { | ||
EQ = "equal", | ||
GT = "greater", | ||
GTE = "greaterorequal", | ||
LT = "less", | ||
LTE = "lessorequal", | ||
LK = "like", | ||
NE = "notequal", | ||
NLK = "notlike" | ||
} | ||
export default SearchType; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type SearchType from './SearchType'; | ||
export interface FilterDataOption { | ||
caseSensitive?: boolean; | ||
includeNull?: boolean; | ||
offset?: number; | ||
limit?: number; | ||
} | ||
export interface SearchCondition { | ||
key: string | string[]; | ||
value: string | number; | ||
type: SearchType; | ||
} | ||
export interface SearchConditionMultiple { | ||
key: string | string[] | string[][]; | ||
value?: string | number; | ||
type: SearchType; | ||
} | ||
export type DataObjectValues = string | number | (string | number)[]; | ||
export interface DataObject { | ||
[key: string]: DataObjectValues | DataObject; | ||
} | ||
export type DataObjectWithNullValues = DataObjectValues | null; | ||
export interface DataObjectWithNull { | ||
[key: string]: DataObjectWithNullValues | DataObjectWithNull; | ||
} | ||
export type Predicator = (data: DataObject) => boolean; | ||
export type FilterFunction = (conditions: SearchCondition, caseSensitive: boolean, data: DataObject) => boolean; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { transduce, filter, curry, complement, allPass, anyPass, drop, take } from 'ramda'; | ||
import type { DataObjectValues, DataObjectWithNull } from './types'; | ||
type AnyFunction = (...args: any[]) => any; | ||
declare function listCombiner(list: any[], val: any): any[]; | ||
declare function compose(...fns: AnyFunction[]): (...args: any[]) => any[]; | ||
declare function getObjValue(data: DataObjectWithNull, key: string | string[]): DataObjectValues | undefined; | ||
export { listCombiner, compose, transduce, filter, curry, complement, allPass, anyPass, drop, take, getObjValue, }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { F } from 'ts-toolbelt'; | ||
import type { SearchCondition, DataObject } from '../lib/types'; | ||
type PredicatorWithOptions = (searchCondition: SearchCondition, caseSensitive: boolean, data: DataObject) => boolean; | ||
/** | ||
* exclude data if targetValue is an array | ||
* | ||
* @param {*function} filterCallback | ||
* @param {*object} searchCondition: { name, value } | ||
* @param {*boolean} caseSensitive: false | ||
* @param {*DataObject} data | ||
*/ | ||
declare const excludeIfTargetValueIsArray: (predicator: PredicatorWithOptions, searchCondition: SearchCondition, caseSensitive: boolean, data: DataObject) => boolean; | ||
declare const targetValueArray: F.Curry<typeof excludeIfTargetValueIsArray>; | ||
export default targetValueArray; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import type { DataObjectWithNull, Predicator, SearchCondition } from '../lib/types'; | ||
declare const _default: import("ts-toolbelt/out/Function/Curry").Curry<(includeNull: boolean, { key }: SearchCondition, predicator: Predicator, data: DataObjectWithNull) => boolean>; | ||
export default _default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.