Comparing version 2.0.34 to 2.0.35
@@ -8,2 +8,3 @@ import { WsFormattedMessage, WsMessage24hrMiniTickerRaw, WsMessage24hrTickerFormatted, WsMessageFuturesUserDataAccountConfigUpdateEventRaw, WsMessageFuturesUserDataAccountUpdateRaw, WsMessageFuturesUserDataEventFormatted, WsMessageFuturesUserDataOrderTradeUpdateEventRaw, WsMessageKlineFormatted, WsMessageKlineRaw, WsMessageMarkPriceUpdateEventFormatted, WsMessageSpotUserDataEventFormatted, WsRawMessage, WsUserDataEvents } from '..'; | ||
export declare function isWsFormatted24hrTicker(data: WsFormattedMessage): data is WsMessage24hrTickerFormatted; | ||
export declare function isWsFormatted24hrTickerArray(data: WsFormattedMessage): data is WsMessage24hrTickerFormatted[]; | ||
export declare function isWsFormattedUserDataEvent(data: WsFormattedMessage): data is WsUserDataEvents; | ||
@@ -10,0 +11,0 @@ export declare function isWsFormattedSpotUserDataEvent(data: WsFormattedMessage): data is WsMessageSpotUserDataEventFormatted; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isAccountUpdateRaw = exports.isAccountConfigUpdateRaw = exports.isOrderTradeUpdateRaw = exports.isKlineRaw = exports.is24hrMiniTickerRaw = exports.isAll24hrMiniTickerRaw = exports.isWsFormattedFuturesUserDataEvent = exports.isWsFormattedSpotUserDataEvent = exports.isWsFormattedUserDataEvent = exports.isWsFormatted24hrTicker = exports.isWsFormattedKline = exports.isWsFormattedMarkPriceUpdate = exports.isWsFormattedMarkPriceUpdateArray = exports.isWsFormattedMarkPriceUpdateEvent = void 0; | ||
exports.isAccountUpdateRaw = exports.isAccountConfigUpdateRaw = exports.isOrderTradeUpdateRaw = exports.isKlineRaw = exports.is24hrMiniTickerRaw = exports.isAll24hrMiniTickerRaw = exports.isWsFormattedFuturesUserDataEvent = exports.isWsFormattedSpotUserDataEvent = exports.isWsFormattedUserDataEvent = exports.isWsFormatted24hrTickerArray = exports.isWsFormatted24hrTicker = exports.isWsFormattedKline = exports.isWsFormattedMarkPriceUpdate = exports.isWsFormattedMarkPriceUpdateArray = exports.isWsFormattedMarkPriceUpdateEvent = void 0; | ||
/* | ||
@@ -30,2 +30,6 @@ Use type guards to narrow down types with minimal efforts. | ||
exports.isWsFormatted24hrTicker = isWsFormatted24hrTicker; | ||
function isWsFormatted24hrTickerArray(data) { | ||
return (Array.isArray(data) && data.length !== 0 && isWsFormatted24hrTicker(data[0])); | ||
} | ||
exports.isWsFormatted24hrTickerArray = isWsFormatted24hrTickerArray; | ||
function isWsFormattedUserDataEvent(data) { | ||
@@ -32,0 +36,0 @@ return !Array.isArray(data) && data.wsKey.includes('userData'); |
{ | ||
"name": "binance", | ||
"version": "2.0.34", | ||
"version": "2.0.35", | ||
"description": "Node.js connector for Binance's REST APIs and WebSockets, with TypeScript & integration tests.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
353914
6404