@map.ir/services-sdk
Version:
JavaScript/TypeScript SDK for map.ir services
16 lines (15 loc) • 863 B
TypeScript
/** Determines value is not undefined or null. */
export declare const isValue: <T>(value: T | null | undefined) => value is T;
type NonNullableProp<T, Cond> = {
[P in keyof T]: Exclude<T[P], Cond>;
};
/** Cleans Object from undefined, null (normal), and also falsy valus (strict) */
export declare const cleanObj: <T extends Record<string, unknown>>(obj: T, strict?: boolean) => NonNullableProp<T, null | undefined>;
/** converts all properties of an object to string, using .toString method. */
export declare const convertAllPropsToString: (obj: Record<string, unknown>) => Record<string, string>;
export declare const qs: <T extends Record<string, {
toString(): string;
}>>(obj: T) => string;
/** Converts numbers in a string to Farsi (persian) numebrs */
export declare const toFaDigits: (input: string | number) => string;
export {};