Comparing version 0.0.1 to 0.0.2
/* | ||
bitmagic - this module is used handled bits | ||
* | ||
* @author Alex Ayala<ing.jaab@ugmail.com> | ||
// | ||
*/ | ||
// | ||
*/ | ||
exports.intToHexBuffer = function(int, length){ | ||
@@ -42,7 +42,7 @@ | ||
for (var i = 7; i >= 0; i--) { | ||
var bit = data[j] & (1 << i) ? 1 : 0; | ||
var bit = data[j] & (1 << i) ? 1 : 0; | ||
if (counter === n && m === undefined){ | ||
result.string = bit.toString(); | ||
result.value = parseInt(result.string, 2); | ||
result.value = parseInt(result.string, 2); | ||
return result; | ||
@@ -57,4 +57,4 @@ } | ||
result.string = bits; | ||
result.value = parseInt(result.string, 2); | ||
result.bitmap = bits; | ||
result.value = parseInt(result.bitmap, 2); | ||
return result; | ||
@@ -68,3 +68,3 @@ }; | ||
var value = exports.extractBitsFromByte(buf, 3); | ||
console.log(value.string); | ||
console.log(value.bitmap); | ||
console.log(value.value); | ||
@@ -80,2 +80,2 @@ | ||
*/ | ||
*/ |
{ | ||
"name": "bitmagic", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "An clean and easy node module to handle bits.", | ||
@@ -5,0 +5,0 @@ "main": "bitmagic.js", |
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
50
20016