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

@waves/bignumber

Package Overview
Dependencies
Maintainers
16
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@waves/bignumber - npm Package Compare versions

Comparing version 0.0.1-a to 0.0.1-a2

dist/bignumber.umd.js

6

dist/BigNumber.d.ts

@@ -1,2 +0,2 @@

import { BigNumber as BigNum } from 'bignumber.js';
import { default as BigNum } from 'bignumber.js';
import { Config, IFormat } from './Config';

@@ -36,3 +36,3 @@ declare type TLong = string | number | BigNumber;

toFormat(decimals?: number, format?: IFormat): string;
toFixed(decimals?: number): string;
toFixed(decimals?: number, roundMode?: BigNumber.ROUND_MODE): string;
toJSON(): string;

@@ -61,2 +61,2 @@ static fromBytes(bytes: Uint8Array | Array<number>): BigNumber;

}
export {};
export default BigNumber;
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var bignumber_js_1 = require("bignumber.js");
var bignumber_js_1 = __importDefault(require("bignumber.js"));
var Config_1 = require("./Config");

@@ -97,3 +100,3 @@ var BigNumber = /** @class */ (function () {

};
BigNumber.prototype.toFixed = function (decimals) {
BigNumber.prototype.toFixed = function (decimals, roundMode) {
if (decimals == null) {

@@ -103,3 +106,3 @@ return this.bn.toFixed();

else {
return this.bn.toFixed(decimals);
return this.bn.toFixed(decimals, roundMode);
}

@@ -119,3 +122,3 @@ };

.join('');
var result = new BigNumber(new bignumber_js_1.BigNumber(byteString, 2));
var result = new BigNumber(new bignumber_js_1.default(byteString, 2));
if (isNegative) {

@@ -161,3 +164,3 @@ return result.mul(-1).sub(1);

BigNumber.toBigNumberJs = function (long) {
if (bignumber_js_1.BigNumber.isBigNumber(long)) {
if (bignumber_js_1.default.isBigNumber(long)) {
return long;

@@ -169,3 +172,3 @@ }

else {
return new bignumber_js_1.BigNumber(long);
return new bignumber_js_1.default(long);
}

@@ -187,2 +190,3 @@ };

exports.BigNumber = BigNumber;
exports.default = BigNumber;
//# sourceMappingURL=BigNumber.js.map

@@ -13,8 +13,11 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var bignumber_js_1 = require("bignumber.js");
var bignumber_js_1 = __importDefault(require("bignumber.js"));
var Config = /** @class */ (function () {
function Config() {
this.format = Config.DEFAULT_FORMAT;
bignumber_js_1.BigNumber.config({ FORMAT: this.format });
bignumber_js_1.default.config({ FORMAT: this.format });
}

@@ -26,3 +29,3 @@ Config.prototype.set = function (configPart) {

}
bignumber_js_1.BigNumber.config(configPart);
bignumber_js_1.default.config(configPart);
};

@@ -29,0 +32,0 @@ Config.DEFAULT_FORMAT = {

{
"name": "@waves/bignumber",
"version": "0.0.1-a",
"version": "0.0.1-a2",
"description": "Waves Library for work with Bignumber in javascript",
"main": "index.js",
"types": "dist/index.d.ts",
"browser": "dist/bignumber.umd.min.js",
"files": [
"dist"
],
"repository": {
"type": "git",
"url": "https://github.com/wavesplatform/bignumber.git"
},
"scripts": {
"test": "jest",
"prepare": "tsc -p ./",
"prepare": "tsc -p ./ && rollup -c",
"postversion": "npm publish",

@@ -32,2 +37,7 @@ "prepublish": "npm run test",

"long": "^4.0.0",
"rollup": "^1.12.3",
"rollup-plugin-commonjs": "^10.0.0",
"rollup-plugin-node-resolve": "^5.0.0",
"rollup-plugin-typescript": "^1.0.1",
"rollup-plugin-uglify": "^6.0.2",
"ts-jest": "^24.0.2",

@@ -34,0 +44,0 @@ "typescript": "^3.4.5"

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