Socket
Socket
Sign inDemoInstall

long

Package Overview
Dependencies
0
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.0 to 2.2.1

2

bower.json
{
"name": "long",
"version": "2.2.0",
"version": "2.2.1",
"author": "Daniel Wirtz <dcode@dcode.io>",

@@ -5,0 +5,0 @@ "description": "A Long class for representing a 64 bit two's-complement integer value.",

@@ -512,3 +512,3 @@ /*

other = Long.fromValue(other);
if (this.unsigned !== other.unsigned && (this.high >>> 31) !== (other.high >>> 31))
if (this.unsigned !== other.unsigned && (this.high >>> 31) === (other.high >>> 31))
return false;

@@ -515,0 +515,0 @@ return this.high === other.high && this.low === other.low;

@@ -12,3 +12,3 @@ (function(){/*

0};b.prototype.getLowBits=function(){return this.low};b.prototype.getLowBitsUnsigned=function(){return this.low>>>0};b.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(b.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var a=0!=this.high?this.high:this.low,c=31;0<c&&0==(a&1<<c);c--);return 0!=this.high?c+33:c+1};b.prototype.isZero=function(){return 0===this.high&&0===this.low};b.prototype.isNegative=function(){return!this.unsigned&&0>this.high};b.prototype.isPositive=function(){return this.unsigned||
0<=this.high};b.prototype.isOdd=function(){return 1===(this.low&1)};b.prototype.equals=function(a){b.isLong(a)||(a=b.fromValue(a));return this.unsigned!==a.unsigned&&this.high>>>31!==a.high>>>31?!1:this.high===a.high&&this.low===a.low};b.prototype.notEquals=function(a){b.isLong(a)||(a=b.fromValue(a));return!this.equals(a)};b.prototype.lessThan=function(a){b.isLong(a)||(a=b.fromValue(a));return 0>this.compare(a)};b.prototype.lessThanOrEqual=function(a){b.isLong(a)||(a=b.fromValue(a));return 0>=this.compare(a)};
0<=this.high};b.prototype.isOdd=function(){return 1===(this.low&1)};b.prototype.equals=function(a){b.isLong(a)||(a=b.fromValue(a));return this.unsigned!==a.unsigned&&this.high>>>31===a.high>>>31?!1:this.high===a.high&&this.low===a.low};b.prototype.notEquals=function(a){b.isLong(a)||(a=b.fromValue(a));return!this.equals(a)};b.prototype.lessThan=function(a){b.isLong(a)||(a=b.fromValue(a));return 0>this.compare(a)};b.prototype.lessThanOrEqual=function(a){b.isLong(a)||(a=b.fromValue(a));return 0>=this.compare(a)};
b.prototype.greaterThan=function(a){b.isLong(a)||(a=b.fromValue(a));return 0<this.compare(a)};b.prototype.greaterThanOrEqual=function(a){return 0<=this.compare(a)};b.prototype.compare=function(a){if(this.equals(a))return 0;var b=this.isNegative(),d=a.isNegative();return b&&!d?-1:!b&&d?1:this.unsigned?a.high>>>0>this.high>>>0||a.high===this.high&&a.low>>>0>this.low>>>0?-1:1:this.subtract(a).isNegative()?-1:1};b.prototype.negate=function(){return!this.unsigned&&this.equals(b.MIN_VALUE)?b.MIN_VALUE:

@@ -15,0 +15,0 @@ this.not().add(b.ONE)};b.prototype.add=function(a){b.isLong(a)||(a=b.fromValue(a));var c=this.high>>>16,d=this.high&65535,e=this.low>>>16,f=a.high>>>16,g=a.high&65535,k=a.low>>>16,m;m=0+((this.low&65535)+(a.low&65535));a=0+(m>>>16);a+=e+k;e=0+(a>>>16);e+=d+g;d=0+(e>>>16);d=d+(c+f)&65535;return b.fromBits((a&65535)<<16|m&65535,d<<16|e&65535,this.unsigned)};b.prototype.subtract=function(a){b.isLong(a)||(a=b.fromValue(a));return this.add(a.negate())};b.prototype.multiply=function(a){if(this.isZero())return b.ZERO;

{
"name": "long",
"version": "2.2.0",
"version": "2.2.1",
"author": "Daniel Wirtz <dcode@dcode.io>",

@@ -5,0 +5,0 @@ "description": "A Long class for representing a 64-bit two's-complement integer value.",

@@ -512,3 +512,3 @@ /*

other = Long.fromValue(other);
if (this.unsigned !== other.unsigned && (this.high >>> 31) !== (other.high >>> 31))
if (this.unsigned !== other.unsigned && (this.high >>> 31) === (other.high >>> 31))
return false;

@@ -515,0 +515,0 @@ return this.high === other.high && this.low === other.low;

@@ -144,2 +144,9 @@ /*

test.done();
},
"msb_unsigned": function(test) {
var longVal = Long.UONE.shiftLeft(63);
test.ok(longVal.notEquals(Long.MIN_VALUE));
test.equal(longVal.toString(), "9223372036854775808");
test.done();
}

@@ -146,0 +153,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc