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

@webassemblyjs/leb128

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webassemblyjs/leb128 - npm Package Compare versions

Comparing version 1.11.1 to 1.11.4

10

esm/leb.js

@@ -242,3 +242,11 @@ // Copyright 2012 The Obvious Corporation.

function decodeInt64(encodedBuffer, index) {
var result = decodeIntBuffer(encodedBuffer, index);
var result = decodeIntBuffer(encodedBuffer, index); // sign-extend if necessary
var length = result.value.length;
if (result.value[length - 1] >> 7) {
result.value = bufs.resize(result.value, 8);
result.value.fill(255, length);
}
var value = Long.fromBytesLE(result.value, false);

@@ -245,0 +253,0 @@ bufs.free(result.value);

16

lib/index.js

@@ -17,3 +17,3 @@ "use strict";

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -35,27 +35,27 @@ /**

function decodeInt64(encodedBuffer, index) {
return _leb.default.decodeInt64(encodedBuffer, index);
return _leb["default"].decodeInt64(encodedBuffer, index);
}
function decodeUInt64(encodedBuffer, index) {
return _leb.default.decodeUInt64(encodedBuffer, index);
return _leb["default"].decodeUInt64(encodedBuffer, index);
}
function decodeInt32(encodedBuffer, index) {
return _leb.default.decodeInt32(encodedBuffer, index);
return _leb["default"].decodeInt32(encodedBuffer, index);
}
function decodeUInt32(encodedBuffer, index) {
return _leb.default.decodeUInt32(encodedBuffer, index);
return _leb["default"].decodeUInt32(encodedBuffer, index);
}
function encodeU32(v) {
return _leb.default.encodeUInt32(v);
return _leb["default"].encodeUInt32(v);
}
function encodeI32(v) {
return _leb.default.encodeInt32(v);
return _leb["default"].encodeInt32(v);
}
function encodeI64(v) {
return _leb.default.encodeInt64(v);
return _leb["default"].encodeInt64(v);
}

@@ -12,6 +12,8 @@ // Copyright 2012 The Obvious Corporation.

function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
exports["default"] = void 0;

@@ -24,6 +26,8 @@ var _long = _interopRequireDefault(require("@xtuc/long"));

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
/*

@@ -255,6 +259,13 @@ * Module variables

function decodeInt64(encodedBuffer, index) {
var result = decodeIntBuffer(encodedBuffer, index);
var result = decodeIntBuffer(encodedBuffer, index); // sign-extend if necessary
var value = _long.default.fromBytesLE(result.value, false);
var length = result.value.length;
if (result.value[length - 1] >> 7) {
result.value = bufs.resize(result.value, 8);
result.value.fill(255, length);
}
var value = _long["default"].fromBytesLE(result.value, false);
bufs.free(result.value);

@@ -311,3 +322,3 @@ return {

var value = _long.default.fromBytesLE(result.value, true);
var value = _long["default"].fromBytesLE(result.value, true);

@@ -336,2 +347,2 @@ bufs.free(result.value);

};
exports.default = _default;
exports["default"] = _default;
{
"name": "@webassemblyjs/leb128",
"version": "1.11.1",
"version": "1.11.4",
"description": "LEB128 decoder and encoder",

@@ -22,3 +22,3 @@ "license": "Apache-2.0",

},
"gitHead": "3f07e2db2031afe0ce686630418c542938c1674b"
"gitHead": "5fd2425602b752576bbe8089c343d5d70ebc861c"
}
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