UNPKG

es-toolkit-clean

Version:

A lightweight, TypeScript-first library for cleaning JavaScript objects by removing undefined values, empty strings, empty arrays, functions, and other unwanted properties. Built on es-toolkit for superior performance.

16 lines (15 loc) 580 B
import { identity } from 'es-toolkit/function'; import { cleanArray, cleanObject } from '../utils/helpers'; export declare const defaultProcessors: { isArray: typeof cleanArray; isBoolean: typeof identity; isDate: typeof identity; isFunction: (_?: unknown) => boolean | void; isNull: typeof identity; isNumber: typeof identity; isObjectLike: typeof cleanObject; isPlainObject: typeof cleanObject; isString: (item: unknown) => unknown; isUndefined: (_?: unknown) => boolean | void; }; export type ProcessorConfig = typeof defaultProcessors;