Socket
Socket
Sign inDemoInstall

ctype

Package Overview
Dependencies
0
Maintainers
0
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

tools/jsstyle

4

ctio.js

@@ -807,5 +807,5 @@ /*

wuint32(value[0], endian, buffer, offset);
wuint32(value[1], endian, buffer, offset+3);
wuint32(value[1], endian, buffer, offset+4);
} else {
wuint32(value[0], endian, buffer, offset+3);
wuint32(value[0], endian, buffer, offset+4);
wuint32(value[1], endian, buffer, offset);

@@ -812,0 +812,0 @@ }

@@ -196,3 +196,3 @@ /*

* We're going to write 0s into the buffer if the string is shorter than the
* length of the array.
* length of the array.
*/

@@ -199,0 +199,0 @@ function ctWriteCharArray(value, length, endian, buffer, offset)

{
"name": "ctype",
"version": "0.0.2",
"version": "0.0.3",
"description": "read and write binary structures and data types",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/rmustacc/node-ctype",

@@ -118,4 +118,40 @@ /*

function test64()
{
var data = new Buffer(10);
var value = 0x0007cda8e7f90a6d;
var high = Math.floor(value / Math.pow(2, 32));
var low = value - (high * Math.pow(2, 32));
ASSERT.equal(0x0007cda8, high);
ASSERT.equal(0xe7f90a6d, low);
mod_ctype.wuint64([high, low], 'big', data, 0);
ASSERT.equal(0x00, data[0]);
ASSERT.equal(0x07, data[1]);
ASSERT.equal(0xcd, data[2]);
ASSERT.equal(0xa8, data[3]);
ASSERT.equal(0xe7, data[4]);
ASSERT.equal(0xf9, data[5]);
ASSERT.equal(0x0a, data[6]);
ASSERT.equal(0x6d, data[7]);
mod_ctype.wuint64([high, low], 'little', data, 0);
ASSERT.equal(0x6d, data[0]);
ASSERT.equal(0x0a, data[1]);
ASSERT.equal(0xf9, data[2]);
ASSERT.equal(0xe7, data[3]);
ASSERT.equal(0xa8, data[4]);
ASSERT.equal(0xcd, data[5]);
ASSERT.equal(0x07, data[6]);
ASSERT.equal(0x00, data[7]);
}
test8();
test16();
test32();
test64();
exports.test8 = test8;
exports.test16 = test16;
exports.test32 = test32;
exports.test64 = test64;

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc