endianness
Advanced tools
Comparing version 2.0.0 to 3.0.0
@@ -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
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
1035348
81