@dfinity/candid
Advanced tools
Comparing version 0.12.2-beta.0 to 0.12.2
@@ -10,2 +10,3 @@ "use strict"; | ||
const leb128_1 = require("./utils/leb128"); | ||
const bigint_math_1 = require("./utils/bigint-math"); | ||
const magicNumber = 'DIDL'; | ||
@@ -509,4 +510,4 @@ function zipWith(xs, ys, f) { | ||
covariant(x) { | ||
const min = BigInt(2) ** BigInt(this._bits - 1) * BigInt(-1); | ||
const max = BigInt(2) ** BigInt(this._bits - 1) - BigInt(1); | ||
const min = (0, bigint_math_1.iexp2)(this._bits - 1) * BigInt(-1); | ||
const max = (0, bigint_math_1.iexp2)(this._bits - 1) - BigInt(1); | ||
if (typeof x === 'bigint') { | ||
@@ -560,3 +561,3 @@ return x >= min && x <= max; | ||
covariant(x) { | ||
const max = BigInt(2) ** BigInt(this._bits); | ||
const max = (0, bigint_math_1.iexp2)(this._bits); | ||
if (typeof x === 'bigint' && x >= BigInt(0)) { | ||
@@ -563,0 +564,0 @@ return x < max; |
@@ -6,2 +6,3 @@ // tslint:disable:max-classes-per-file | ||
import { lebDecode, lebEncode, readIntLE, readUIntLE, safeRead, safeReadUint8, slebDecode, slebEncode, writeIntLE, writeUIntLE, } from './utils/leb128'; | ||
import { iexp2 } from './utils/bigint-math'; | ||
const magicNumber = 'DIDL'; | ||
@@ -492,4 +493,4 @@ function zipWith(xs, ys, f) { | ||
covariant(x) { | ||
const min = BigInt(2) ** BigInt(this._bits - 1) * BigInt(-1); | ||
const max = BigInt(2) ** BigInt(this._bits - 1) - BigInt(1); | ||
const min = iexp2(this._bits - 1) * BigInt(-1); | ||
const max = iexp2(this._bits - 1) - BigInt(1); | ||
if (typeof x === 'bigint') { | ||
@@ -542,3 +543,3 @@ return x >= min && x <= max; | ||
covariant(x) { | ||
const max = BigInt(2) ** BigInt(this._bits); | ||
const max = iexp2(this._bits); | ||
if (typeof x === 'bigint' && x >= BigInt(0)) { | ||
@@ -545,0 +546,0 @@ return x < max; |
{ | ||
"name": "@dfinity/candid", | ||
"version": "0.12.2-beta.0", | ||
"version": "0.12.2", | ||
"author": "DFINITY Stiftung <sdk@dfinity.org>", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -7,3 +7,3 @@ # @dfinity/candid | ||
Additional API Documentation can be found [here](https://agent-js.icp.host/candid/index.html). | ||
Additional API Documentation can be found [here](https://agent-js.icp.xyz/candid/index.html). | ||
@@ -10,0 +10,0 @@ --- |
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
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
599326
60
6536
3