@icazemier/gibbons 6.0.1 → 6.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,29 +19,24 @@ class Gibbon {
19
19
  * @returns {boolean} if instance (or contents) are the same
20
20
  */
21
21
  equals(gibbon) {
22
- let same = false;
23
22
  const arrayBuffer = gibbon.arrayBuffer;
24
23
  const thisArrayBuffer = this.arrayBuffer;
25
24
  if (thisArrayBuffer === arrayBuffer) {
26
- same = true;
25
+ return true;
27
26
  }
28
- else {
29
- const thisDataView = this.dataView;
30
- const dataView = gibbon.dataView;
31
- const byteLength = Math.max(thisArrayBuffer.byteLength, arrayBuffer.byteLength);
32
- let result = true;
33
- for (let i = 0; i < byteLength && result; i++) {
34
- const value1 = i < thisDataView.byteLength
35
- ? thisDataView.getUint8(i)
36
- : 0x0;
37
- const value2 = i < dataView.byteLength ? dataView.getUint8(i) : 0x0;
38
- if (value1 !== value2) {
39
- result = false;
40
- }
27
+ const thisDataView = this.dataView;
28
+ const dataView = gibbon.dataView;
29
+ const byteLength = Math.max(thisArrayBuffer.byteLength, arrayBuffer.byteLength);
30
+ for (let i = 0; i < byteLength; i++) {
31
+ const value1 = i < thisDataView.byteLength
32
+ ? thisDataView.getUint8(i)
33
+ : 0x0;
34
+ const value2 = i < dataView.byteLength ? dataView.getUint8(i) : 0x0;
35
+ if (value1 !== value2) {
36
+ return false;
41
37
  }
42
- same = result;
43
38
  }
44
- return same;
39
+ return true;
45
40
  }
46
41
  /**
47
42
  * This method analyzes every bit value in this gibbon and creates the corresponding <br>
@@ -18,29 +18,24 @@ export class Gibbon {
18
18
  * @returns {boolean} if instance (or contents) are the same
19
19
  */
20
20
  equals(gibbon) {
21
- let same = false;
22
21
  const arrayBuffer = gibbon.arrayBuffer;
23
22
  const thisArrayBuffer = this.arrayBuffer;
24
23
  if (thisArrayBuffer === arrayBuffer) {
25
- same = true;
24
+ return true;
26
25
  }
27
- else {
28
- const thisDataView = this.dataView;
29
- const dataView = gibbon.dataView;
30
- const byteLength = Math.max(thisArrayBuffer.byteLength, arrayBuffer.byteLength);
31
- let result = true;
32
- for (let i = 0; i < byteLength && result; i++) {
33
- const value1 = i < thisDataView.byteLength
34
- ? thisDataView.getUint8(i)
35
- : 0x0;
36
- const value2 = i < dataView.byteLength ? dataView.getUint8(i) : 0x0;
37
- if (value1 !== value2) {
38
- result = false;
39
- }
26
+ const thisDataView = this.dataView;
27
+ const dataView = gibbon.dataView;
28
+ const byteLength = Math.max(thisArrayBuffer.byteLength, arrayBuffer.byteLength);
29
+ for (let i = 0; i < byteLength; i++) {
30
+ const value1 = i < thisDataView.byteLength
31
+ ? thisDataView.getUint8(i)
32
+ : 0x0;
33
+ const value2 = i < dataView.byteLength ? dataView.getUint8(i) : 0x0;
34
+ if (value1 !== value2) {
35
+ return false;
40
36
  }
41
- same = result;
42
37
  }
43
- return same;
38
+ return true;
44
39
  }
45
40
  /**
46
41
  * This method analyzes every bit value in this gibbon and creates the corresponding <br>
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@icazemier/gibbons",
3
3
  "type": "module",
4
4
  "private": false,
5
- "version": "6.0.1",
5
+ "version": "6.0.2",
6
6
  "description": "Gibbons is a Node.js module which helps in managing user groups and user permissions with `bitwise` efficiency.",
7
7
  "contributors": [
8
8
  {
@@ -56,8 +56,11 @@
56
56
  },
57
57
  "homepage": "https://icazemier.github.io/gibbons/",
58
58
  "license": "MIT",
59
+ "overrides": {
60
+ "minimatch": "^10.2.1"
61
+ },
59
62
  "devDependencies": {
60
- "@eslint/js": "^9.26.0",
63
+ "@eslint/js": "^10.0.0",
61
64
  "@semantic-release/changelog": "^6.0.3",
62
65
  "@semantic-release/commit-analyzer": "^13.0.1",
63
66
  "@semantic-release/github": "^12.0.6",
@@ -68,13 +71,13 @@
68
71
  "@vitest/ui": "^4.0.18",
69
72
  "conventional-changelog-conventionalcommits": "^9.1.0",
70
73
  "cross-env": "^7.0.3",
71
- "eslint": "^9.26.0",
74
+ "eslint": "^10.0.0",
72
75
  "rimraf": "^6.0.1",
73
76
  "semantic-release": "^25.0.3",
74
77
  "ts-node": "^10.9.2",
75
- "typedoc": "^0.28.3",
78
+ "typedoc": "^0.28.17",
76
79
  "typescript": "^5.8.3",
77
- "typescript-eslint": "^8.31.1",
80
+ "typescript-eslint": "^8.56.0",
78
81
  "vitest": "^4.0.18"
79
82
  }
80
83
  }