@injectivelabs/utils
Advanced tools
Comparing version 1.0.13 to 1.0.14
@@ -1,5 +0,4 @@ | ||
import { ComposerResponse, Web3GatewayMessage } from '@injectivelabs/ts-types'; | ||
import { ComposerResponse } from '@injectivelabs/ts-types'; | ||
export declare const sleep: (timeout: number) => Promise<void>; | ||
export declare const isServerSide: () => boolean; | ||
export declare const getWeb3GatewayMessage: <T>(message: T, type: string) => Web3GatewayMessage<T>; | ||
export declare const mapMultipleComposerResponseMessages: <T, R>(messages: ComposerResponse<T, R>[]) => { | ||
@@ -6,0 +5,0 @@ web3GatewayMessage: R[]; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.mapMultipleComposerResponseMessages = exports.getWeb3GatewayMessage = exports.isServerSide = exports.sleep = void 0; | ||
const snakecase_keys_1 = __importDefault(require("snakecase-keys")); | ||
exports.mapMultipleComposerResponseMessages = exports.isServerSide = exports.sleep = void 0; | ||
const sleep = (timeout) => new Promise((resolve) => setTimeout(resolve, timeout)); | ||
@@ -12,4 +8,2 @@ exports.sleep = sleep; | ||
exports.isServerSide = isServerSide; | ||
const getWeb3GatewayMessage = (message, type) => (Object.assign(Object.assign({}, (0, snakecase_keys_1.default)(message)), { '@type': type })); | ||
exports.getWeb3GatewayMessage = getWeb3GatewayMessage; | ||
const mapMultipleComposerResponseMessages = (messages) => messages.reduce((messages, message) => { | ||
@@ -16,0 +10,0 @@ const web3GatewayMessage = Array.isArray(message.web3GatewayMessage) |
{ | ||
"name": "@injectivelabs/utils", | ||
"description": "List of utils and helper functions that can be reused throughout Injective's projects.", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"author": { | ||
@@ -43,3 +43,3 @@ "name": "Bojan Angjelkoski", | ||
}, | ||
"gitHead": "8c36c822a3303a62d7a9a2665ea04396b591a6d0" | ||
"gitHead": "377705969bf1dd34c5a344ba3999290ab79a1f21" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80561
1068