relation-matcher 1.0.13 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +4 -4
- package/.yarn/install-state.gz +0 -0
- package/.yarn/releases/yarn-4.13.0.cjs +940 -940
- package/.yarnrc.yml +3 -3
- package/README.md +185 -150
- package/dist/src/index.d.ts +10 -5
- package/dist/src/index.js +35 -46
- package/dist/src/types/generic-bases.d.ts +2 -1
- package/dist/src/types/generic-less.d.ts +8 -3
- package/dist/src/types/inputs.d.ts +14 -7
- package/dist/src/types/return.d.ts +5 -2
- package/dist/src/types/typetest.d.ts +1 -0
- package/dist/src/types/utils.d.ts +3 -0
- package/dist/src/utils/invertInput.d.ts +2 -1
- package/dist/src/utils/invertInput.js +4 -9
- package/dist/src/utils/isNullable.d.ts +2 -0
- package/dist/src/utils/isNullable.js +6 -0
- package/dist/src/utils/joins.d.ts +5 -0
- package/dist/src/utils/joins.js +9 -0
- package/dist/src/utils/keys.js +6 -1
- package/dist/src/utils/matcher.d.ts +3 -3
- package/dist/src/utils/matcher.js +2 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +36 -36
- package/src/index.test.ts +105 -105
- package/src/index.ts +124 -151
- package/src/testing/file-output.ts +15 -15
- package/src/testing/test-data.ts +172 -172
- package/src/types/generic-bases.ts +10 -9
- package/src/types/generic-less.ts +20 -14
- package/src/types/index.ts +5 -5
- package/src/types/inputs.ts +36 -30
- package/src/types/return.ts +65 -67
- package/src/types/typetest.ts +87 -84
- package/src/types/utils.ts +33 -28
- package/src/utils/invertInput.ts +27 -28
- package/src/utils/isNullable.ts +11 -0
- package/src/utils/joins.ts +22 -0
- package/src/utils/keys.ts +7 -1
- package/src/utils/matcher.ts +16 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TInputBase } from "~/types/generic-bases";
|
|
2
|
-
import type { InvertedInput } from "./invertInput";
|
|
1
|
+
import type { TInputBase, TInputBaseJoin } from "~/types/generic-bases";
|
|
3
2
|
import type { Output } from "~/types/generic-less";
|
|
4
|
-
export
|
|
3
|
+
export type MatcherFunc = (item: TInputBaseJoin | null) => item is TInputBaseJoin;
|
|
4
|
+
export declare const createMatcherFunc: <TInput extends TInputBase>(row: TInput[keyof TInput], value: Output) => MatcherFunc;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const createMatcherFunc = (row, value) => (item) => !!item &&
|
|
2
|
+
row?.[value.joinsFrom] === item?.[value.joinsTo];
|