Socket
Socket
Sign inDemoInstall

sift

Package Overview
Dependencies
Maintainers
2
Versions
155
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sift - npm Package Compare versions

Comparing version 13.1.4 to 13.1.5

15

lib/core.d.ts

@@ -10,6 +10,5 @@ import { Key, Comparator } from "./utils";

export declare type OperationCreator = (params: any, parentQuery: any, options: Options) => Operation;
declare type ValueQuery<TValue> = {
declare type NestedValueQuery<TValue> = {
$eq?: TValue;
$ne?: TValue;
$elemMatch?: Query<TValue>;
$lt?: TValue;

@@ -29,7 +28,11 @@ $gt?: TValue;

};
declare type RootValueQuery<TValue> = {
$elemMatch?: Query<TValue, true>;
} & NestedValueQuery<TValue>;
declare type ValueQuery<TValue, nested> = nested extends true ? NestedValueQuery<TValue> : RootValueQuery<TValue>;
declare type NotObject = string | number | Date | boolean | Array<any>;
declare type ShapeQuery<TItemSchema> = TItemSchema extends NotObject ? {} : {
[k in keyof TItemSchema]?: TItemSchema[k] | Query<TItemSchema[k]>;
declare type ShapeQuery<TItemSchema, nested> = TItemSchema extends NotObject ? {} : {
[k in keyof TItemSchema]?: TItemSchema[k] | ValueQuery<TItemSchema[k], nested>;
};
export declare type Query<TItemSchema> = ValueQuery<TItemSchema> & ShapeQuery<TItemSchema>;
export declare type Query<TItemSchema, nested = false> = ValueQuery<TItemSchema, nested> & ShapeQuery<TItemSchema, nested>;
export declare abstract class BaseOperation<TParams> implements Operation {

@@ -94,3 +97,3 @@ readonly params: TParams;

export declare const createQueryOperation: (query: any, owneryQuery: any, options: Options) => any;
export declare const createQueryTester: <TItem, TSchema = TItem>(query: Query<TSchema>, { compare, operations }?: Partial<Options>) => (item: TItem, key?: Key, owner?: any) => any;
export declare const createQueryTester: <TItem, TSchema = TItem>(query: Query<TSchema, false>, { compare, operations }?: Partial<Options>) => (item: TItem, key?: Key, owner?: any) => any;
export {};

2

lib/index.d.ts
import { Query, Options, createQueryTester, EqualsOperation, createEqualsOperation } from "./core";
declare const createDefaultQueryTester: <TItem, TSchema extends TItem = TItem>(query: Query<TSchema>, { compare, operations }?: Partial<Options>) => (item: TItem, key?: string | number, owner?: any) => any;
declare const createDefaultQueryTester: <TItem, TSchema extends TItem = TItem>(query: Query<TSchema, false>, { compare, operations }?: Partial<Options>) => (item: TItem, key?: string | number, owner?: any) => any;
export { Query, EqualsOperation, createQueryTester, createEqualsOperation };
export * from "./operations";
export default createDefaultQueryTester;
{
"name": "sift",
"description": "MongoDB query filtering in JavaScript",
"version": "13.1.4",
"version": "13.1.5",
"repository": "crcn/sift.js",

@@ -6,0 +6,0 @@ "sideEffects": false,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc