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

@ombori/epc-ean

Package Overview
Dependencies
Maintainers
18
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ombori/epc-ean - npm Package Compare versions

Comparing version 3.33.2 to 3.41.1

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [3.41.1](https://github.com/sergiss/epc-tds/compare/v3.41.0...v3.41.1) (2023-05-08)
### Bug Fixes
* support for environment not supporting BigInt literals ([b428083](https://github.com/sergiss/epc-tds/commit/b4280839a168cdbf73338ec52dbad32781105d86))
## [3.33.2](https://github.com/sergiss/epc-tds/compare/v3.33.1...v3.33.2) (2023-04-19)

@@ -8,0 +19,0 @@

131

dist/epc/utils/bit-array.js

@@ -41,5 +41,7 @@ "use strict";

let v = BigInt(value);
for (let i = 0n; startIndex < endIndex; i++) {
for (let i = BigInt(0); startIndex < endIndex; i = i + BigInt(1)) {
// Changed i = 0n to i = BigInt(0)
endIndex--;
if ((v >> i) & 1n) {
if ((v >> i) & BigInt(1)) {
// Changed 1n to BigInt(1)
// check bit

@@ -54,6 +56,7 @@ this.setBit(endIndex);

getBigInt(startIndex, endIndex) {
let result = 0n;
for (let i = 0n; startIndex < endIndex; i++) {
let result = BigInt(0); // Changed 0n to BigInt(0)
for (let i = BigInt(0); startIndex < endIndex; i = i + BigInt(1)) {
// Changed i = 0n to i = BigInt(0)
if (this.isBit(--endIndex)) {
result |= 1n << i; // set bit
result |= BigInt(1) << i; // set bit, Changed 1n to BigInt(1)
}

@@ -67,9 +70,10 @@ }

getSigned(startIndex, endIndex) {
let i, result = 0n;
for (i = 0n; startIndex < endIndex; i++) {
let i, result = BigInt(0); // Changed 0n to BigInt(0)
for (i = BigInt(0); startIndex < endIndex; i = i + BigInt(1)) {
// Changed i = 0n to i = BigInt(0)
if (this.isBit(--endIndex)) {
result |= 1n << i; // set bit
result |= BigInt(1) << i; // set bit, Changed 1n to BigInt(1)
}
}
let mask = 1n << (i - 1n);
let mask = BigInt(1) << (i - BigInt(1)); // Changed 1n to BigInt(1)
if (result & mask) {

@@ -219,7 +223,106 @@ // check first bit

BitArray.REVERSE_DEC_TABLE = [
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 0, 8, 4, 12, 2, 10, 6, 14, 1, 9, -1, -1, -1, -1, -1, -1, -1, 5, 13, 3,
11, 7, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 5, 13, 3, 11, 7, 15, -1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
0,
8,
4,
12,
2,
10,
6,
14,
1,
9,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
5,
13,
3,
11,
7,
15,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
5,
13,
3,
11,
7,
15,
-1,
];

4

package.json
{
"name": "@ombori/epc-ean",
"version": "3.33.2",
"version": "3.41.1",
"directories": {

@@ -54,3 +54,3 @@ "doc": "doc"

},
"gitHead": "3f67e129b730c1a8741628f932140aba6fa62ad4"
"gitHead": "6df81083812b6b841022bb3d1bf753e61ad5df4c"
}

@@ -43,5 +43,7 @@ export class BitArray {

let v = BigInt(value);
for (let i = 0n; startIndex < endIndex; i++) {
for (let i = BigInt(0); startIndex < endIndex; i = i + BigInt(1)) {
// Changed i = 0n to i = BigInt(0)
endIndex--;
if ((v >> i) & 0b1n) {
if ((v >> i) & BigInt(1)) {
// Changed 1n to BigInt(1)
// check bit

@@ -54,8 +56,8 @@ this.setBit(endIndex);

}
getBigInt(startIndex, endIndex) {
let result = 0n;
for (let i = 0n; startIndex < endIndex; i++) {
let result = BigInt(0); // Changed 0n to BigInt(0)
for (let i = BigInt(0); startIndex < endIndex; i = i + BigInt(1)) {
// Changed i = 0n to i = BigInt(0)
if (this.isBit(--endIndex)) {
result |= 1n << i; // set bit
result |= BigInt(1) << i; // set bit, Changed 1n to BigInt(1)
}

@@ -72,9 +74,10 @@ }

let i,
result = 0n;
for (i = 0n; startIndex < endIndex; i++) {
result = BigInt(0); // Changed 0n to BigInt(0)
for (i = BigInt(0); startIndex < endIndex; i = i + BigInt(1)) {
// Changed i = 0n to i = BigInt(0)
if (this.isBit(--endIndex)) {
result |= 1n << i; // set bit
result |= BigInt(1) << i; // set bit, Changed 1n to BigInt(1)
}
}
let mask = 1n << (i - 1n);
let mask = BigInt(1) << (i - BigInt(1)); // Changed 1n to BigInt(1)
if (result & mask) {

@@ -239,7 +242,106 @@ // check first bit

BitArray.REVERSE_DEC_TABLE = [
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 0, 8, 4, 12, 2, 10, 6, 14, 1, 9, -1, -1, -1, -1, -1, -1, -1, 5, 13, 3,
11, 7, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 5, 13, 3, 11, 7, 15, -1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
0,
8,
4,
12,
2,
10,
6,
14,
1,
9,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
5,
13,
3,
11,
7,
15,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
-1,
5,
13,
3,
11,
7,
15,
-1,
];
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