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 5.0.0-alpha.4 to 5.0.0

0

dist/endianness.min.js
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) {}

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