binance
Version:
Professional Node.js & JavaScript SDK for Binance REST APIs & WebSockets, with TypeScript & end-to-end tests.
24 lines (23 loc) • 944 B
TypeScript
import { WsFormattedMessage } from '../types/websockets/ws-events-formatted';
export interface BeautifierConfig {
warnKeyMissingInMap: boolean;
}
export default class Beautifier {
private beautificationMap;
private floatKeys;
private floatKeysHashMap;
private config;
constructor(config: BeautifierConfig);
setWarnIfMissing(value: boolean): void;
beautifyValueWithKey(key: string | number, val: unknown): unknown;
/**
* Beautify array or object, recurisvely
*/
beautifyObjectValues(data: any | any[]): {};
beautifyArrayValues(data: any[], parentKey?: string | number): any[];
beautify(data: any, key?: string | number): any;
/**
* Entry point to beautify WS message. EventType is determined automatically unless this is a combined stream event.
*/
beautifyWsMessage(event: any, eventType?: string, isCombined?: boolean, eventMapSuffix?: string): WsFormattedMessage;
}