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

eos-common

Package Overview
Dependencies
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eos-common - npm Package Compare versions

Comparing version 0.10.0 to 0.11.0

2

dist/eosiolib/asset.js

@@ -44,3 +44,3 @@ "use strict";

const precision = (amount_str.split(".")[1] || []).length;
this.amount = utils_1.number_to_bigint(Number(amount_str) * Math.pow(10, precision));
this.amount = utils_1.number_to_bigint(amount_str);
this.symbol = new symbol_1.Sym(symbol_str, precision);

@@ -47,0 +47,0 @@ }

@@ -8,3 +8,3 @@ import { Sym } from "./symbol";

export declare function getType(obj: any): string;
export declare function number_to_bigint(num: number): BigInteger;
export declare function number_to_bigint(num: number | string): BigInteger;
export declare function isNull(value: any): boolean;

@@ -11,0 +11,0 @@ export declare function getAmount(obj: any): BigInteger;

@@ -16,2 +16,4 @@ "use strict";

function number_to_bigint(num) {
if (typeof num == "string")
return big_integer_1.default(num.replace(".", ""));
return big_integer_1.default(Math.floor(Number(num.toFixed(0))));

@@ -36,3 +38,3 @@ }

if (typeof obj == "string")
return number_to_bigint(Number(obj));
return number_to_bigint(obj);
throw new Error("invalid getAmount param");

@@ -39,0 +41,0 @@ }

{
"name": "eos-common",
"version": "0.10.0",
"version": "0.11.0",
"description": "EOSIO Smart Contract common library used for Typescript",

@@ -12,3 +12,5 @@ "main": "dist/index.js",

"contributors": [
"John Williamson <@Velua>"
"John Williamson <@Velua>",
"Yaro <@YaroShkvorets>",
"Artem <@Avm07>"
],

@@ -30,3 +32,3 @@ "license": "MIT",

"@types/jest": "*",
"@typescript-eslint/eslint-plugin": "^2.20.0",
"@typescript-eslint/eslint-plugin": "*",
"@typescript-eslint/parser": "*",

@@ -41,4 +43,4 @@ "documentation": "*",

"dependencies": {
"big-integer": "^1.6.48"
"big-integer": "1.x"
}
}
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