Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@injectivelabs/utils

Package Overview
Dependencies
Maintainers
11
Versions
321
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@injectivelabs/utils - npm Package Compare versions

Comparing version 1.0.63 to 1.0.64

1

dist/index.d.ts

@@ -5,3 +5,4 @@ export * from './classes/index';

export * from './time';
export * from './numbers';
export * from './constants';
//# sourceMappingURL=index.d.ts.map

@@ -21,3 +21,4 @@ "use strict";

__exportStar(require("./time"), exports);
__exportStar(require("./numbers"), exports);
__exportStar(require("./constants"), exports);
//# sourceMappingURL=index.js.map
import { BigNumber } from './classes';
export declare const getSignificantDecimalsFromNumber: (number: BigNumber | number | string) => number;
export declare const getExactDecimalsFromNumber: (number: number | string) => number;
//# sourceMappingURL=numbers.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSignificantDecimalsFromNumber = void 0;
exports.getExactDecimalsFromNumber = exports.getSignificantDecimalsFromNumber = void 0;
const classes_1 = require("./classes");

@@ -19,2 +19,16 @@ const $BigNumber = classes_1.BigNumber.clone({ ROUNDING_MODE: classes_1.BigNumber.ROUND_DOWN });

exports.getSignificantDecimalsFromNumber = getSignificantDecimalsFromNumber;
const getExactDecimalsFromNumber = (number) => {
if (!number.toString().includes('.')) {
return 0;
}
if (Number(number) % 1 === 0) {
return 0;
}
const [, decimals] = number.toString().split('.');
if (!decimals) {
return 0;
}
return decimals.length;
};
exports.getExactDecimalsFromNumber = getExactDecimalsFromNumber;
//# sourceMappingURL=numbers.js.map

4

package.json
{
"name": "@injectivelabs/utils",
"description": "List of utils and helper functions that can be reused throughout Injective's projects.",
"version": "1.0.63",
"version": "1.0.64",
"author": {

@@ -44,3 +44,3 @@ "name": "Bojan Angjelkoski",

},
"gitHead": "d452b6574ebc880c210fec27180c2f5eeed6159e"
"gitHead": "77d292f25a2457d33cc8a067348265e92d4244cd"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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