@poap-xyz/poaps
Advanced tools
Comparing version 0.0.22 to 0.0.23
@@ -5,3 +5,4 @@ export declare function filterUndefinedProperties<T extends Record<string, any>>(obj: T): Partial<T>; | ||
export declare function creatEqFilter(key: string, value?: string | number): Record<string, any>; | ||
export declare function creatAddressFilter(key: string, value?: string): Record<string, any>; | ||
export declare function createInFilter(key: string, values?: Array<string | number>): Record<string, any>; | ||
export declare function createBetweenFilter(key: string, from?: string, to?: string): Record<string, any>; |
@@ -5,3 +5,4 @@ export declare function filterUndefinedProperties<T extends Record<string, any>>(obj: T): Partial<T>; | ||
export declare function creatEqFilter(key: string, value?: string | number): Record<string, any>; | ||
export declare function creatAddressFilter(key: string, value?: string): Record<string, any>; | ||
export declare function createInFilter(key: string, values?: Array<string | number>): Record<string, any>; | ||
export declare function createBetweenFilter(key: string, from?: string, to?: string): Record<string, any>; |
@@ -60,8 +60,8 @@ (function (global, factory) { | ||
} | ||
function createFilter(key, value) { | ||
return value ? { [key]: { _ilike: `%${value}%` } } : {}; | ||
} | ||
function creatEqFilter(key, value) { | ||
return value ? { [key]: { _eq: value } } : {}; | ||
} | ||
function creatAddressFilter(key, value) { | ||
return value ? { [key]: { _eq: value.toLocaleLowerCase() } } : {}; | ||
} | ||
function createInFilter(key, values) { | ||
@@ -92,3 +92,3 @@ return values && values.length ? { [key]: { _in: values } } : {}; | ||
where: { | ||
...createFilter('collector_address', collector_address), | ||
...creatAddressFilter('collector_address', collector_address), | ||
...creatEqFilter('chain', chain), | ||
@@ -95,0 +95,0 @@ ...creatEqFilter('drop_id', drop_id), |
@@ -5,3 +5,4 @@ export declare function filterUndefinedProperties<T extends Record<string, any>>(obj: T): Partial<T>; | ||
export declare function creatEqFilter(key: string, value?: string | number): Record<string, any>; | ||
export declare function creatAddressFilter(key: string, value?: string): Record<string, any>; | ||
export declare function createInFilter(key: string, values?: Array<string | number>): Record<string, any>; | ||
export declare function createBetweenFilter(key: string, from?: string, to?: string): Record<string, any>; |
{ | ||
"name": "@poap-xyz/poaps", | ||
"version": "0.0.22", | ||
"version": "0.0.23", | ||
"description": "Poaps module for the poap.js library", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.cjs", |
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
52681
599