bin-protocol
Advanced tools
Comparing version 0.0.2 to 1.0.1
@@ -94,3 +94,8 @@ "use strict"; | ||
write: function (value) { | ||
var long = Long.fromString(value + ''); | ||
var long; | ||
if(typeof value === 'number'){ | ||
long = Long.fromNumber(value); | ||
} else { | ||
long = Long.fromString(value + ''); | ||
} | ||
this.buffer.writeInt32BE(long.getHighBits(), this.offset); | ||
@@ -109,3 +114,8 @@ this.buffer.writeInt32BE(long.getLowBits(), this.offset + 4); | ||
write: function (value) { | ||
var long = Long.fromString(value + ''); | ||
var long; | ||
if(typeof value === 'number'){ | ||
long = Long.fromNumber(value); | ||
} else { | ||
long = Long.fromString(value + ''); | ||
} | ||
this.buffer.writeInt32LE(long.getHighBits(), this.offset + 4); | ||
@@ -112,0 +122,0 @@ this.buffer.writeInt32LE(long.getLowBits(), this.offset); |
@@ -9,3 +9,3 @@ { | ||
}, | ||
"version": "0.0.2", | ||
"version": "1.0.1", | ||
"main": "./lib/index.js", | ||
@@ -12,0 +12,0 @@ "keywords": ["buffer"], |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
67525
555
0