Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

endianness

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

endianness - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

2

index.js

@@ -52,2 +52,2 @@ /*!

module.exports.endianness = endianness;
module.exports = endianness;
{
"name": "endianness",
"version": "2.0.0",
"version": "3.0.0",
"description": "Swap endianness in byte arrays.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/rochars/endianness",

@@ -11,5 +11,5 @@ # endianness

- Works in Node.js and in the browser
- Arguments can be **Array<number>**, **Array<string>** and **Uint8Array**
- Works with **number arrays**, **string arrays** and **Uint8Array**
- Works with any byte offset
- The byte array is modified in-place.
- The input array is modified in-place.

@@ -26,9 +26,8 @@ ## Install

// Swap endianness of one 64-bit value:
endianness.endianness([64, 9, 33, 251, 84, 68, 45, 24], 8);
//[24, 45, 68, 84, 251, 33, 9, 64]
endianness([64, 9, 33, 251, 84, 68, 45, 24], 8);
// returns [24, 45, 68, 84, 251, 33, 9, 64]
// Swap endianness of two 24-bit values:
endianness.endianness(
["00", "00", "80", "ff", "ff", "7f"], 3),
// ["80", "00", "00", "7f", "ff", "ff"]);
endianness(["00", "00", "80", "ff", "ff", "7f"], 3),
// returns ["80", "00", "00", "7f", "ff", "ff"];
```

@@ -35,0 +34,0 @@

Sorry, the diff of this file is not supported yet

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc