Commit
This commit is contained in:
commit
d1c8cae2c1
1417 changed files with 326736 additions and 0 deletions
54
node_modules/sift/src/index.ts
generated
vendored
Normal file
54
node_modules/sift/src/index.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
import * as defaultOperations from "./operations";
|
||||
import {
|
||||
Query,
|
||||
QueryOperators,
|
||||
BasicValueQuery,
|
||||
ArrayValueQuery,
|
||||
ValueQuery,
|
||||
NestedQuery,
|
||||
ShapeQuery,
|
||||
Options,
|
||||
createQueryTester,
|
||||
EqualsOperation,
|
||||
createQueryOperation,
|
||||
createEqualsOperation,
|
||||
createOperationTester,
|
||||
} from "./core";
|
||||
|
||||
const createDefaultQueryOperation = <TItem, TSchema extends TItem = TItem>(
|
||||
query: Query<TSchema>,
|
||||
ownerQuery: any,
|
||||
{ compare, operations }: Partial<Options> = {},
|
||||
) => {
|
||||
return createQueryOperation(query, ownerQuery, {
|
||||
compare,
|
||||
operations: Object.assign({}, defaultOperations, operations || {}),
|
||||
});
|
||||
};
|
||||
|
||||
const createDefaultQueryTester = <TItem, TSchema extends TItem = TItem>(
|
||||
query: Query<TSchema>,
|
||||
options: Partial<Options> = {},
|
||||
) => {
|
||||
const op = createDefaultQueryOperation(query, null, options);
|
||||
return createOperationTester(op);
|
||||
};
|
||||
|
||||
export {
|
||||
Query,
|
||||
QueryOperators,
|
||||
BasicValueQuery,
|
||||
ArrayValueQuery,
|
||||
ValueQuery,
|
||||
NestedQuery,
|
||||
ShapeQuery,
|
||||
EqualsOperation,
|
||||
createQueryTester,
|
||||
createOperationTester,
|
||||
createDefaultQueryOperation,
|
||||
createEqualsOperation,
|
||||
createQueryOperation,
|
||||
};
|
||||
export * from "./operations";
|
||||
|
||||
export default createDefaultQueryTester;
|
||||
Loading…
Add table
Add a link
Reference in a new issue