endianness
Advanced tools
Comparing version 5.0.0-alpha.4 to 5.0.0
window.endianness=function(d){function c(a){if(e[a])return e[a].a;var b=e[a]={m:a,f:!1,a:{}};d[a].call(b.a,b,b.a,c);b.f=!0;return b.a}var e={};c.l=d;c.h=e;c.b=function(a,b){c.c(a)||Object.defineProperty(a,"a",{configurable:!1,enumerable:!0,get:b})};c.i=function(a){var b=a&&a.g?function(){return a["default"]}:function(){return a};c.b(b,b);return b};c.c=function(a){return Object.prototype.hasOwnProperty.call(a,"a")};c.j="";return c(c.o=0)}([function(d){d.a=function(c,e){var a=c.length;if(a%e)throw Error("Not enough bytes."); | ||
for(var b=0;b<a;){for(var d=c,f=b,g=0,h=e-1,k=parseInt(e/2,10);g<k;){var l=d[f+g];d[f+g]=d[f+h];d[f+h]=l;g++;h--}b+=e}}}]); |
14
index.js
@@ -29,7 +29,6 @@ /* | ||
/** | ||
* Swap the endianness of units of information in a byte array. | ||
* The original array is modified in place. | ||
* Swap the byte ordering in a buffer. The buffer is modified in place. | ||
* @param {!Array<number|string>|!Uint8Array} bytes The bytes. | ||
* @param {number} offset The number of bytes of each unit of information. | ||
* @throws {Error} If the byte array length is not valid. | ||
* @param {number} offset The byte offset. | ||
* @throws {Error} If the buffer length is not valid. | ||
*/ | ||
@@ -49,7 +48,6 @@ function endianness(bytes, offset) { | ||
/** | ||
* Swap the endianness of a unit of information in a byte array. | ||
* The original array is modified in place. | ||
* Swap the byte order of a value in a buffer. The buffer is modified in place. | ||
* @param {!Array<number|string>|!Uint8Array} bytes The bytes. | ||
* @param {number} offset The number of bytes of the unit of information. | ||
* @param {number} index The start index of the unit of information. | ||
* @param {number} offset The byte offset. | ||
* @param {number} index The start index. | ||
* @private | ||
@@ -56,0 +54,0 @@ */ |
{ | ||
"name": "endianness", | ||
"version": "5.0.0-alpha.4", | ||
"version": "5.0.0", | ||
"description": "Swap endianness in byte arrays.", | ||
"homepage": "https://github.com/rochars/endianness", | ||
"author": "Rafael da Silva Rocha <rocha.rafaelsilva@gmail.com>", | ||
"author": "Rafael S. Rocha <rocha.rafaelsilva@gmail.com>", | ||
"license": "MIT", | ||
"keywords": [ | ||
"binary", | ||
"byte", | ||
"swap", | ||
"array", | ||
"Uint8Array", | ||
"endianness", | ||
"big-endian", | ||
"little-endian", | ||
"endian", | ||
"endianness", | ||
"swap", | ||
"binary", | ||
"network order", | ||
"browser" | ||
"network order" | ||
], | ||
@@ -21,0 +18,0 @@ "repository": { |
@@ -52,7 +52,6 @@ # endianness | ||
/** | ||
* Swap the endianness of units of information in a byte array. | ||
* The original array is modified in place. | ||
* Swap the byte ordering in a buffer. The buffer is modified in place. | ||
* @param {!Array<number|string>|!Uint8Array} bytes The bytes. | ||
* @param {number} offset The number of bytes of each unit of information. | ||
* @throws {Error} If the byte array length is not valid. | ||
* @param {number} offset The byte offset. | ||
* @throws {Error} If the buffer length is not valid. | ||
*/ | ||
@@ -59,0 +58,0 @@ function endianness(bytes, offset) {} |
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 bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
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 bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
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
1
8859
66
81