fexios
Version:
Fetch based HTTP client with similar API to axios for browser and Node.js
21 lines (20 loc) • 720 B
TypeScript
/**
* Utility functions for Fexios
*/
/**
* Check if the data is likely text content
*/
export declare function checkIfTextData(uint8Array: Uint8Array, maxBytesToCheck?: number): boolean;
/**
* Check if given payload is a plain object
* "plain object", means it is not an instance of any class or built-in type,
* or just like Record<string, any> in TypeScript.
*/
export declare function checkIsPlainObject(payload: any): payload is Record<string, any>;
/**
* Remove all undefined and null properties from an object
* Also handles empty strings based on options
*/
export declare function dropUndefinedAndNull<T extends Record<string, any>>(obj: T, options?: {
dropEmptyString?: boolean;
}): Partial<T>;