mirror of
https://github.com/bigchaindb/js-bigchaindb-driver.git
synced 2024-11-24 11:01:28 +01:00
858acf2693
Signed-off-by: getlarge <ed@getlarge.eu>
26 lines
681 B
TypeScript
26 lines
681 B
TypeScript
// Copyright BigchainDB GmbH and BigchainDB contributors
|
|
// SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
|
// Code is Apache-2.0 and docs are CC-BY-4.0
|
|
|
|
declare type FilterFn = (val: any, key?: string) => void;
|
|
|
|
declare function filterFromObject<I = Record<string, any>>(
|
|
obj: I,
|
|
filter: Array | FilterFn,
|
|
conf: { isInclusion?: boolean } = {}
|
|
): Partial<I>;
|
|
|
|
declare function applyFilterOnObject<I = Record<string, any>>(
|
|
obj: I,
|
|
filterFn?: FilterFn
|
|
): Partial<I>;
|
|
|
|
declare function selectFromObject<I = Record<string, any>>(
|
|
obj: I,
|
|
filter: Array | FilterFn
|
|
): Partial<I>;
|
|
|
|
export default function sanitize<I = Record<string, any>>(
|
|
obj: I
|
|
): Partial<I> | I;
|