Socket
Socket
Sign inDemoInstall

cuint

Package Overview
Dependencies
0
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.2 to 0.1.3

7

build/uint32.js

@@ -209,6 +209,10 @@ /**

// other == 1
if (other._high == 0 && other._low == 1) return this
if (other._high == 0 && other._low == 1) {
this.remainder = new UINT32(0)
return this
}
// other > this: 0
if ( other.gt(this) ) {
this.remainder = new UINT32(0)
this._low = 0

@@ -220,2 +224,3 @@ this._high = 0

if ( this.eq(other) ) {
this.remainder = new UINT32(0)
this._low = 1

@@ -222,0 +227,0 @@ this._high = 0

2

build/uint32.min.js

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

!function(t){function h(t,s){return this instanceof h?(this.remainder=null,"undefined"==typeof s?o.call(this,t):"string"==typeof t?r.call(this,t,s):(i.call(this,t,s),void 0)):new h(t,s)}function i(t,h){return this._low=0|t,this._high=0|h,this}function o(t){return this._low=65535&t,this._high=t>>>16,this}function r(t,h){var i=parseInt(t,h||10);return this._low=65535&i,this._high=i>>>16,this}var s=({36:h(Math.pow(36,5)),16:h(Math.pow(16,7)),10:h(Math.pow(10,9)),2:h(Math.pow(2,30))},{36:h(36),16:h(16),10:h(10),2:h(2)});h.prototype.fromBits=i,h.prototype.fromNumber=o,h.prototype.fromString=r,h.prototype.toNumber=function(){return this._high<<16|this._low},h.prototype.toString=function(t){t=t||10;var i=s[t]||new h(t);if(!this.gt(i))return this.toNumber().toString(t);for(var o=this.clone(),r=new Array(32),e=31;e>=0&&(o.div(i),r[e]=o.remainder.toNumber().toString(t),o.gt(i));e--);return r[e-1]=o.toNumber().toString(t),r.join("")},h.prototype.add=function(t){var h=this._low+t._low,i=h>>>16;return i+=this._high+t._high,this._low=65535&h,this._high=65535&i,this},h.prototype.subtract=function(t){return this.add(t.clone().negate())},h.prototype.multiply=function(t){var h,i,o=this._high,r=this._low,s=t._high,e=t._low;return i=r*e,h=i>>>16,h+=o*e,h&=65535,h+=r*s,this._low=65535&i,this._high=65535&h,this},h.prototype.div=function(t){if(0==t._low&&0==t._high)throw Error("division by zero");if(0==t._high&&1==t._low)return this;if(t.gt(this))return this._low=0,this._high=0,this;if(this.eq(t))return this._low=1,this._high=0,this;for(var h=t.clone(),i=-1;!this.lt(h);)h.shiftLeft(1,!0),i++;for(this.remainder=this.clone(),this._low=0,this._high=0;i>=0;i--)h.shiftRight(1),this.remainder.lt(h)||(this.remainder.subtract(h),i>16?this._high|=1<<i-16:this._low|=1<<i);return this},h.prototype.negate=h.prototype.not=function(){var t=(65535&~this._low)+1;return this._low=65535&t,this._high=~this._high+(t>>>16)&65535,this},h.prototype.equals=h.prototype.eq=function(t){return this._low==t._low&&this._high==t._high},h.prototype.greaterThan=h.prototype.gt=function(t){return this._high>t._high?!0:this._high<t._high?!1:this._low>t._low},h.prototype.lessThan=h.prototype.lt=function(t){return this._high<t._high?!0:this._high>t._high?!1:this._low<t._low},h.prototype.or=function(t){return this._low|=t._low,this._high|=t._high,this},h.prototype.and=function(t){return this._low&=t._low,this._high&=t._high,this},h.prototype.xor=function(t){return this._low^=t._low,this._high^=t._high,this},h.prototype.shiftRight=h.prototype.shiftr=function(t){return t>16?(this._low=this._high>>>t-16,this._high=0):16==t?(this._low=this._high,this._high=0):(this._low=this._low>>>t|this._high<<16-t&65535,this._high=this._high>>t),this},h.prototype.shiftLeft=h.prototype.shiftl=function(t,h){return t>16?(this._high=this._low<<t-16,this._low=0,h||(this._high&=65535)):16==t?(this._high=this._low,this._low=0):(this._high=this._high<<t|this._low>>>16-t,this._low=this._low<<t&65535,h||(this._high&=65535)),this},h.prototype.rotateLeft=h.prototype.rotl=function(t){var h=this._high<<16|this._low;return h=h<<t|h>>>32-t,this._low=65535&h,this._high=h>>>16,this},h.prototype.rotateRight=h.prototype.rotr=function(t){var h=this._high<<16|this._low;return h=h>>>t|h<<32-t,this._low=65535&h,this._high=h>>>16,this},h.prototype.clone=function(){return new h(this._low,this._high)},"undefined"!=typeof define&&define.amd?define([],function(){return h}):"undefined"!=typeof module&&module.exports?module.exports=h:t.UINT32=h}(this);
!function(t){function h(t,s){return this instanceof h?(this.remainder=null,"undefined"==typeof s?o.call(this,t):"string"==typeof t?r.call(this,t,s):(i.call(this,t,s),void 0)):new h(t,s)}function i(t,h){return this._low=0|t,this._high=0|h,this}function o(t){return this._low=65535&t,this._high=t>>>16,this}function r(t,h){var i=parseInt(t,h||10);return this._low=65535&i,this._high=i>>>16,this}var s=({36:h(Math.pow(36,5)),16:h(Math.pow(16,7)),10:h(Math.pow(10,9)),2:h(Math.pow(2,30))},{36:h(36),16:h(16),10:h(10),2:h(2)});h.prototype.fromBits=i,h.prototype.fromNumber=o,h.prototype.fromString=r,h.prototype.toNumber=function(){return this._high<<16|this._low},h.prototype.toString=function(t){t=t||10;var i=s[t]||new h(t);if(!this.gt(i))return this.toNumber().toString(t);for(var o=this.clone(),r=new Array(32),e=31;e>=0&&(o.div(i),r[e]=o.remainder.toNumber().toString(t),o.gt(i));e--);return r[e-1]=o.toNumber().toString(t),r.join("")},h.prototype.add=function(t){var h=this._low+t._low,i=h>>>16;return i+=this._high+t._high,this._low=65535&h,this._high=65535&i,this},h.prototype.subtract=function(t){return this.add(t.clone().negate())},h.prototype.multiply=function(t){var h,i,o=this._high,r=this._low,s=t._high,e=t._low;return i=r*e,h=i>>>16,h+=o*e,h&=65535,h+=r*s,this._low=65535&i,this._high=65535&h,this},h.prototype.div=function(t){if(0==t._low&&0==t._high)throw Error("division by zero");if(0==t._high&&1==t._low)return this.remainder=new h(0),this;if(t.gt(this))return this.remainder=new h(0),this._low=0,this._high=0,this;if(this.eq(t))return this.remainder=new h(0),this._low=1,this._high=0,this;for(var i=t.clone(),o=-1;!this.lt(i);)i.shiftLeft(1,!0),o++;for(this.remainder=this.clone(),this._low=0,this._high=0;o>=0;o--)i.shiftRight(1),this.remainder.lt(i)||(this.remainder.subtract(i),o>16?this._high|=1<<o-16:this._low|=1<<o);return this},h.prototype.negate=h.prototype.not=function(){var t=(65535&~this._low)+1;return this._low=65535&t,this._high=~this._high+(t>>>16)&65535,this},h.prototype.equals=h.prototype.eq=function(t){return this._low==t._low&&this._high==t._high},h.prototype.greaterThan=h.prototype.gt=function(t){return this._high>t._high?!0:this._high<t._high?!1:this._low>t._low},h.prototype.lessThan=h.prototype.lt=function(t){return this._high<t._high?!0:this._high>t._high?!1:this._low<t._low},h.prototype.or=function(t){return this._low|=t._low,this._high|=t._high,this},h.prototype.and=function(t){return this._low&=t._low,this._high&=t._high,this},h.prototype.xor=function(t){return this._low^=t._low,this._high^=t._high,this},h.prototype.shiftRight=h.prototype.shiftr=function(t){return t>16?(this._low=this._high>>>t-16,this._high=0):16==t?(this._low=this._high,this._high=0):(this._low=this._low>>>t|this._high<<16-t&65535,this._high=this._high>>t),this},h.prototype.shiftLeft=h.prototype.shiftl=function(t,h){return t>16?(this._high=this._low<<t-16,this._low=0,h||(this._high&=65535)):16==t?(this._high=this._low,this._low=0):(this._high=this._high<<t|this._low>>>16-t,this._low=this._low<<t&65535,h||(this._high&=65535)),this},h.prototype.rotateLeft=h.prototype.rotl=function(t){var h=this._high<<16|this._low;return h=h<<t|h>>>32-t,this._low=65535&h,this._high=h>>>16,this},h.prototype.rotateRight=h.prototype.rotr=function(t){var h=this._high<<16|this._low;return h=h>>>t|h<<32-t,this._low=65535&h,this._high=h>>>16,this},h.prototype.clone=function(){return new h(this._low,this._high)},"undefined"!=typeof define&&define.amd?define([],function(){return h}):"undefined"!=typeof module&&module.exports?module.exports=h:t.UINT32=h}(this);

@@ -294,3 +294,6 @@ /**

// other == 1: this
if (other._a00 == 1) return this
if (other._a00 == 1) {
this.remainder = new UINT64(0)
return this
}
}

@@ -300,2 +303,3 @@

if ( other.gt(this) ) {
this.remainder = new UINT64(0)
this._a00 = 0

@@ -309,2 +313,3 @@ this._a16 = 0

if ( this.eq(other) ) {
this.remainder = new UINT64(0)
this._a00 = 1

@@ -311,0 +316,0 @@ this._a16 = 0

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

!function(t){function i(t,_,r,e){return this instanceof i?(this.remainder=null,"string"==typeof t?h.call(this,t,_):"undefined"==typeof _?s.call(this,t):(a.apply(this,arguments),void 0)):new i(t,_,r,e)}function a(t,i,a,s){return"undefined"==typeof a?(this._a00=65535&t,this._a16=t>>>16,this._a32=65535&i,this._a48=i>>>16,this):(this._a00=0|t,this._a16=0|i,this._a32=0|a,this._a48=0|s,this)}function s(t){return this._a00=65535&t,this._a16=t>>>16,this._a32=0,this._a48=0,this}function h(t,a){a=a||10,this._a00=0,this._a16=0,this._a32=0,this._a48=0;for(var s=_[a]||new i(Math.pow(a,5)),h=0,r=t.length;r>h;h+=5){var e=Math.min(5,r-h),o=parseInt(t.slice(h,h+e),a);this.multiply(5>e?new i(Math.pow(a,e)):s).add(new i(o))}return this}var _={16:i(Math.pow(16,5)),10:i(Math.pow(10,5)),2:i(Math.pow(2,5))},r={16:i(16),10:i(10),2:i(2)};i.prototype.fromBits=a,i.prototype.fromNumber=s,i.prototype.fromString=h,i.prototype.toNumber=function(){return this._a16<<16|this._a00},i.prototype.toString=function(t){t=t||10;var a=r[t]||new i(t);if(!this.gt(a))return this.toNumber().toString(t);for(var s=this.clone(),h=new Array(64),_=63;_>=0&&(s.div(a),h[_]=s.remainder.toNumber().toString(t),s.gt(a));_--);return h[_-1]=s.toNumber().toString(t),h.join("")},i.prototype.add=function(t){var i=this._a00+t._a00,a=i>>>16;a+=this._a16+t._a16;var s=a>>>16;s+=this._a32+t._a32;var h=s>>>16;return h+=this._a48+t._a48,this._a00=65535&i,this._a16=65535&a,this._a32=65535&s,this._a48=65535&h,this},i.prototype.subtract=function(t){return this.add(t.clone().negate())},i.prototype.multiply=function(t){var i=this._a00,a=this._a16,s=this._a32,h=this._a48,_=t._a00,r=t._a16,e=t._a32,o=t._a48,n=i*_,p=n>>>16;p+=i*r;var u=p>>>16;p&=65535,p+=a*_,u+=p>>>16,u+=i*e;var f=u>>>16;return u&=65535,u+=a*r,f+=u>>>16,u&=65535,u+=s*_,f+=u>>>16,f+=i*o,f&=65535,f+=a*e,f&=65535,f+=s*r,f&=65535,f+=h*_,this._a00=65535&n,this._a16=65535&p,this._a32=65535&u,this._a48=65535&f,this},i.prototype.div=function(t){if(0==t._a16&&0==t._a32&&0==t._a48){if(0==t._a00)throw Error("division by zero");if(1==t._a00)return this}if(t.gt(this))return this._a00=0,this._a16=0,this._a32=0,this._a48=0,this;if(this.eq(t))return this._a00=1,this._a16=0,this._a32=0,this._a48=0,this;for(var i=t.clone(),a=-1;!this.lt(i);)i.shiftLeft(1,!0),a++;for(this.remainder=this.clone(),this._a00=0,this._a16=0,this._a32=0,this._a48=0;a>=0;a--)i.shiftRight(1),this.remainder.lt(i)||(this.remainder.subtract(i),a>=48?this._a48|=1<<a-48:a>=32?this._a32|=1<<a-32:a>=16?this._a16|=1<<a-16:this._a00|=1<<a);return this},i.prototype.negate=i.prototype.not=function(){var t=(65535&~this._a00)+1;return this._a00=65535&t,t=(65535&~this._a16)+(t>>>16),this._a16=65535&t,t=(65535&~this._a32)+(t>>>16),this._a32=65535&t,this._a48=~this._a48+(t>>>16)&65535,this},i.prototype.equals=i.prototype.eq=function(t){return this._a48==t._a48&&this._a00==t._a00&&this._a32==t._a32&&this._a16==t._a16},i.prototype.greaterThan=i.prototype.gt=function(t){return this._a48>t._a48?!0:this._a48<t._a48?!1:this._a32>t._a32?!0:this._a32<t._a32?!1:this._a16>t._a16?!0:this._a16<t._a16?!1:this._a00>t._a00},i.prototype.lessThan=i.prototype.lt=function(t){return this._a48<t._a48?!0:this._a48>t._a48?!1:this._a32<t._a32?!0:this._a32>t._a32?!1:this._a16<t._a16?!0:this._a16>t._a16?!1:this._a00<t._a00},i.prototype.or=function(t){return this._a00|=t._a00,this._a16|=t._a16,this._a32|=t._a32,this._a48|=t._a48,this},i.prototype.and=function(t){return this._a00&=t._a00,this._a16&=t._a16,this._a32&=t._a32,this._a48&=t._a48,this},i.prototype.xor=function(t){return this._a00^=t._a00,this._a16^=t._a16,this._a32^=t._a32,this._a48^=t._a48,this},i.prototype.shiftRight=i.prototype.shiftr=function(t){return t%=64,t>=48?(this._a00=this._a48>>>t-48,this._a16=0,this._a32=0,this._a48=0):t>=32?(t-=32,this._a00=65535&(this._a32>>>t|this._a48<<16-t),this._a16=this._a48>>t&65535,this._a32=0,this._a48=0):t>=16?(t-=16,this._a00=65535&(this._a16>>>t|this._a32<<16-t),this._a16=65535&(this._a32>>>t|this._a48<<16-t),this._a32=this._a48>>t&65535,this._a48=0):(this._a00=65535&(this._a00>>>t|this._a16<<16-t),this._a16=65535&(this._a16>>>t|this._a32<<16-t),this._a32=65535&(this._a32>>>t|this._a48<<16-t),this._a48=this._a48>>t&65535),this},i.prototype.shiftLeft=i.prototype.shiftl=function(t,i){return t%=64,t>=48?(this._a48=this._a00<<t-48,this._a32=0,this._a16=0,this._a00=0):t>=32?(t-=32,this._a48=this._a16<<t|this._a00>>>16-t,this._a32=this._a00<<t&65535,this._a16=0,this._a00=0):t>=16?(t-=16,this._a48=this._a32<<t|this._a16>>>16-t,this._a32=65535&(this._a16<<t|this._a00>>>16-t),this._a16=this._a00<<t&65535,this._a00=0):(this._a48=this._a48<<t|this._a32>>>16-t,this._a32=65535&(this._a32<<t|this._a16>>>16-t),this._a16=65535&(this._a16<<t|this._a00>>>16-t),this._a00=this._a00<<t&65535),i||(this._a48&=65535),this},i.prototype.rotateLeft=i.prototype.rotl=function(t){if(t%=64,0==t)return this;if(t>=32){var i=this._a00;if(this._a00=this._a32,this._a32=i,i=this._a48,this._a48=this._a16,this._a16=i,32==t)return this;t-=32}var a=this._a48<<16|this._a32,s=this._a16<<16|this._a00,h=a<<t|s>>>32-t,_=s<<t|a>>>32-t;return this._a00=65535&_,this._a16=_>>>16,this._a32=65535&h,this._a48=h>>>16,this},i.prototype.rotateRight=i.prototype.rotr=function(t){if(t%=64,0==t)return this;if(t>=32){var i=this._a00;if(this._a00=this._a32,this._a32=i,i=this._a48,this._a48=this._a16,this._a16=i,32==t)return this;t-=32}var a=this._a48<<16|this._a32,s=this._a16<<16|this._a00,h=a>>>t|s<<32-t,_=s>>>t|a<<32-t;return this._a00=65535&_,this._a16=_>>>16,this._a32=65535&h,this._a48=h>>>16,this},i.prototype.clone=function(){return new i(this._a00,this._a16,this._a32,this._a48)},"undefined"!=typeof define&&define.amd?define([],function(){return i}):"undefined"!=typeof module&&module.exports?module.exports=i:t.UINT64=i}(this);
!function(t){function i(t,_,r,e){return this instanceof i?(this.remainder=null,"string"==typeof t?h.call(this,t,_):"undefined"==typeof _?s.call(this,t):(a.apply(this,arguments),void 0)):new i(t,_,r,e)}function a(t,i,a,s){return"undefined"==typeof a?(this._a00=65535&t,this._a16=t>>>16,this._a32=65535&i,this._a48=i>>>16,this):(this._a00=0|t,this._a16=0|i,this._a32=0|a,this._a48=0|s,this)}function s(t){return this._a00=65535&t,this._a16=t>>>16,this._a32=0,this._a48=0,this}function h(t,a){a=a||10,this._a00=0,this._a16=0,this._a32=0,this._a48=0;for(var s=_[a]||new i(Math.pow(a,5)),h=0,r=t.length;r>h;h+=5){var e=Math.min(5,r-h),n=parseInt(t.slice(h,h+e),a);this.multiply(5>e?new i(Math.pow(a,e)):s).add(new i(n))}return this}var _={16:i(Math.pow(16,5)),10:i(Math.pow(10,5)),2:i(Math.pow(2,5))},r={16:i(16),10:i(10),2:i(2)};i.prototype.fromBits=a,i.prototype.fromNumber=s,i.prototype.fromString=h,i.prototype.toNumber=function(){return this._a16<<16|this._a00},i.prototype.toString=function(t){t=t||10;var a=r[t]||new i(t);if(!this.gt(a))return this.toNumber().toString(t);for(var s=this.clone(),h=new Array(64),_=63;_>=0&&(s.div(a),h[_]=s.remainder.toNumber().toString(t),s.gt(a));_--);return h[_-1]=s.toNumber().toString(t),h.join("")},i.prototype.add=function(t){var i=this._a00+t._a00,a=i>>>16;a+=this._a16+t._a16;var s=a>>>16;s+=this._a32+t._a32;var h=s>>>16;return h+=this._a48+t._a48,this._a00=65535&i,this._a16=65535&a,this._a32=65535&s,this._a48=65535&h,this},i.prototype.subtract=function(t){return this.add(t.clone().negate())},i.prototype.multiply=function(t){var i=this._a00,a=this._a16,s=this._a32,h=this._a48,_=t._a00,r=t._a16,e=t._a32,n=t._a48,o=i*_,p=o>>>16;p+=i*r;var u=p>>>16;p&=65535,p+=a*_,u+=p>>>16,u+=i*e;var f=u>>>16;return u&=65535,u+=a*r,f+=u>>>16,u&=65535,u+=s*_,f+=u>>>16,f+=i*n,f&=65535,f+=a*e,f&=65535,f+=s*r,f&=65535,f+=h*_,this._a00=65535&o,this._a16=65535&p,this._a32=65535&u,this._a48=65535&f,this},i.prototype.div=function(t){if(0==t._a16&&0==t._a32&&0==t._a48){if(0==t._a00)throw Error("division by zero");if(1==t._a00)return this.remainder=new i(0),this}if(t.gt(this))return this.remainder=new i(0),this._a00=0,this._a16=0,this._a32=0,this._a48=0,this;if(this.eq(t))return this.remainder=new i(0),this._a00=1,this._a16=0,this._a32=0,this._a48=0,this;for(var a=t.clone(),s=-1;!this.lt(a);)a.shiftLeft(1,!0),s++;for(this.remainder=this.clone(),this._a00=0,this._a16=0,this._a32=0,this._a48=0;s>=0;s--)a.shiftRight(1),this.remainder.lt(a)||(this.remainder.subtract(a),s>=48?this._a48|=1<<s-48:s>=32?this._a32|=1<<s-32:s>=16?this._a16|=1<<s-16:this._a00|=1<<s);return this},i.prototype.negate=i.prototype.not=function(){var t=(65535&~this._a00)+1;return this._a00=65535&t,t=(65535&~this._a16)+(t>>>16),this._a16=65535&t,t=(65535&~this._a32)+(t>>>16),this._a32=65535&t,this._a48=~this._a48+(t>>>16)&65535,this},i.prototype.equals=i.prototype.eq=function(t){return this._a48==t._a48&&this._a00==t._a00&&this._a32==t._a32&&this._a16==t._a16},i.prototype.greaterThan=i.prototype.gt=function(t){return this._a48>t._a48?!0:this._a48<t._a48?!1:this._a32>t._a32?!0:this._a32<t._a32?!1:this._a16>t._a16?!0:this._a16<t._a16?!1:this._a00>t._a00},i.prototype.lessThan=i.prototype.lt=function(t){return this._a48<t._a48?!0:this._a48>t._a48?!1:this._a32<t._a32?!0:this._a32>t._a32?!1:this._a16<t._a16?!0:this._a16>t._a16?!1:this._a00<t._a00},i.prototype.or=function(t){return this._a00|=t._a00,this._a16|=t._a16,this._a32|=t._a32,this._a48|=t._a48,this},i.prototype.and=function(t){return this._a00&=t._a00,this._a16&=t._a16,this._a32&=t._a32,this._a48&=t._a48,this},i.prototype.xor=function(t){return this._a00^=t._a00,this._a16^=t._a16,this._a32^=t._a32,this._a48^=t._a48,this},i.prototype.shiftRight=i.prototype.shiftr=function(t){return t%=64,t>=48?(this._a00=this._a48>>>t-48,this._a16=0,this._a32=0,this._a48=0):t>=32?(t-=32,this._a00=65535&(this._a32>>>t|this._a48<<16-t),this._a16=this._a48>>t&65535,this._a32=0,this._a48=0):t>=16?(t-=16,this._a00=65535&(this._a16>>>t|this._a32<<16-t),this._a16=65535&(this._a32>>>t|this._a48<<16-t),this._a32=this._a48>>t&65535,this._a48=0):(this._a00=65535&(this._a00>>>t|this._a16<<16-t),this._a16=65535&(this._a16>>>t|this._a32<<16-t),this._a32=65535&(this._a32>>>t|this._a48<<16-t),this._a48=this._a48>>t&65535),this},i.prototype.shiftLeft=i.prototype.shiftl=function(t,i){return t%=64,t>=48?(this._a48=this._a00<<t-48,this._a32=0,this._a16=0,this._a00=0):t>=32?(t-=32,this._a48=this._a16<<t|this._a00>>>16-t,this._a32=this._a00<<t&65535,this._a16=0,this._a00=0):t>=16?(t-=16,this._a48=this._a32<<t|this._a16>>>16-t,this._a32=65535&(this._a16<<t|this._a00>>>16-t),this._a16=this._a00<<t&65535,this._a00=0):(this._a48=this._a48<<t|this._a32>>>16-t,this._a32=65535&(this._a32<<t|this._a16>>>16-t),this._a16=65535&(this._a16<<t|this._a00>>>16-t),this._a00=this._a00<<t&65535),i||(this._a48&=65535),this},i.prototype.rotateLeft=i.prototype.rotl=function(t){if(t%=64,0==t)return this;if(t>=32){var i=this._a00;if(this._a00=this._a32,this._a32=i,i=this._a48,this._a48=this._a16,this._a16=i,32==t)return this;t-=32}var a=this._a48<<16|this._a32,s=this._a16<<16|this._a00,h=a<<t|s>>>32-t,_=s<<t|a>>>32-t;return this._a00=65535&_,this._a16=_>>>16,this._a32=65535&h,this._a48=h>>>16,this},i.prototype.rotateRight=i.prototype.rotr=function(t){if(t%=64,0==t)return this;if(t>=32){var i=this._a00;if(this._a00=this._a32,this._a32=i,i=this._a48,this._a48=this._a16,this._a16=i,32==t)return this;t-=32}var a=this._a48<<16|this._a32,s=this._a16<<16|this._a00,h=a>>>t|s<<32-t,_=s>>>t|a<<32-t;return this._a00=65535&_,this._a16=_>>>16,this._a32=65535&h,this._a48=h>>>16,this},i.prototype.clone=function(){return new i(this._a00,this._a16,this._a32,this._a48)},"undefined"!=typeof define&&define.amd?define([],function(){return i}):"undefined"!=typeof module&&module.exports?module.exports=i:t.UINT64=i}(this);

@@ -0,1 +1,6 @@

0.1.3 / 2014-03-06
==================
* #div() always sets the remainder
0.1.2 / 2014-01-17

@@ -2,0 +7,0 @@ ==================

@@ -209,6 +209,10 @@ /**

// other == 1
if (other._high == 0 && other._low == 1) return this
if (other._high == 0 && other._low == 1) {
this.remainder = new UINT32(0)
return this
}
// other > this: 0
if ( other.gt(this) ) {
this.remainder = new UINT32(0)
this._low = 0

@@ -220,2 +224,3 @@ this._high = 0

if ( this.eq(other) ) {
this.remainder = new UINT32(0)
this._low = 1

@@ -222,0 +227,0 @@ this._high = 0

@@ -294,3 +294,6 @@ /**

// other == 1: this
if (other._a00 == 1) return this
if (other._a00 == 1) {
this.remainder = new UINT64(0)
return this
}
}

@@ -300,2 +303,3 @@

if ( other.gt(this) ) {
this.remainder = new UINT64(0)
this._a00 = 0

@@ -309,2 +313,3 @@ this._a16 = 0

if ( this.eq(other) ) {
this.remainder = new UINT64(0)
this._a00 = 1

@@ -311,0 +316,0 @@ this._a16 = 0

{
"name": "cuint",
"version": "0.1.2",
"version": "0.1.3",
"description": "Unsigned integers for Javascript",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc