Socket
Socket
Sign inDemoInstall

@xchainjs/xchain-util

Package Overview
Dependencies
Maintainers
0
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xchainjs/xchain-util - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

7

lib/index.esm.js

@@ -690,3 +690,5 @@ import BigNumber from 'bignumber.js';

***************************************************************************** */
/* global Reflect, Promise, SuppressedError, Symbol */
function __awaiter(thisArg, _arguments, P, generator) {

@@ -702,2 +704,7 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }

typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
var e = new Error(message);
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
};
/* eslint-disable @typescript-eslint/no-explicit-any */

@@ -704,0 +711,0 @@ /**

19

lib/index.js
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var BigNumber = require('bignumber.js');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var BigNumber__default = /*#__PURE__*/_interopDefaultLegacy(BigNumber);
/**

@@ -37,3 +31,3 @@ * Helper to delay anything within an `async` function

*/
const bn = (value) => new BigNumber__default["default"](value);
const bn = (value) => new BigNumber(value);
/**

@@ -155,3 +149,3 @@ * Helper to check whether a BigNumber is valid or not

* */
const isBigNumberValue = (v) => typeof v === 'string' || typeof v === 'number' || v instanceof BigNumber__default["default"];
const isBigNumberValue = (v) => typeof v === 'string' || typeof v === 'number' || v instanceof BigNumber;
/**

@@ -224,3 +218,3 @@ * Default number of asset decimals

times: (v, d = decimal) => baseAmount(amount.times(isBigNumberValue(v) ? v : v.amount()), d),
div: (v, d = decimal) => baseAmount(amount.div(isBigNumberValue(v) ? v : v.amount()).decimalPlaces(0, BigNumber__default["default"].ROUND_DOWN), d),
div: (v, d = decimal) => baseAmount(amount.div(isBigNumberValue(v) ? v : v.amount()).decimalPlaces(0, BigNumber.ROUND_DOWN), d),
lt: (v) => amount.lt(isBigNumberValue(v) ? v : v.amount()),

@@ -701,3 +695,5 @@ lte: (v) => amount.lte(isBigNumberValue(v) ? v : v.amount()),

***************************************************************************** */
/* global Reflect, Promise, SuppressedError, Symbol */
function __awaiter(thisArg, _arguments, P, generator) {

@@ -713,2 +709,7 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }

typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
var e = new Error(message);
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
};
/* eslint-disable @typescript-eslint/no-explicit-any */

@@ -715,0 +716,0 @@ /**

{
"name": "@xchainjs/xchain-util",
"version": "1.0.4",
"version": "1.0.5",
"description": "Helper utilities for XChain clients",

@@ -28,3 +28,3 @@ "keywords": [

"clean": "rm -rf .turbo && rm -rf lib",
"build": "yarn clean && rollup -c",
"build": "yarn clean && rollup -c --bundleConfigAsCjs",
"build:release": "yarn exec rm -rf release && yarn pack && yarn exec \"mkdir release && tar zxvf package.tgz --directory release && rm package.tgz\"",

@@ -31,0 +31,0 @@ "test": "jest",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc