Socket
Socket
Sign inDemoInstall

@dfinity/candid

Package Overview
Dependencies
Maintainers
10
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dfinity/candid - npm Package Compare versions

Comparing version 0.12.2-beta.0 to 0.12.2

lib/cjs/utils/bigint-math.d.ts

7

lib/cjs/idl.js

@@ -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

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