fast-equals
Advanced tools
+12
-9
@@ -43,3 +43,6 @@ 'use strict'; | ||
| function getStrictProperties(object) { | ||
| return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object)); | ||
| const symbols = getOwnPropertySymbols(object); | ||
| return symbols.length | ||
| ? getOwnPropertyNames(object).concat(symbols) | ||
| : getOwnPropertyNames(object); | ||
| } | ||
@@ -142,3 +145,3 @@ /** | ||
| } | ||
| const matchedIndices = new Array(size); | ||
| const matchedIndices = new Uint8Array(size); | ||
| const aIterable = a.entries(); | ||
@@ -154,3 +157,3 @@ let aResult; | ||
| const bIterable = b.entries(); | ||
| let hasMatch = false; | ||
| let hasMatch = 0; | ||
| let matchIndex = 0; | ||
@@ -170,3 +173,3 @@ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition | ||
| && state.equals(aEntry[1], bEntry[1], aEntry[0], bEntry[0], a, b, state)) { | ||
| hasMatch = matchedIndices[matchIndex] = true; | ||
| hasMatch = matchedIndices[matchIndex] = 1; | ||
| break; | ||
@@ -260,3 +263,3 @@ } | ||
| } | ||
| const matchedIndices = new Array(size); | ||
| const matchedIndices = new Uint8Array(size); | ||
| const aIterable = a.values(); | ||
@@ -271,3 +274,3 @@ let aResult; | ||
| const bIterable = b.values(); | ||
| let hasMatch = false; | ||
| let hasMatch = 0; | ||
| let matchIndex = 0; | ||
@@ -281,3 +284,3 @@ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition | ||
| && state.equals(aResult.value, bResult.value, aResult.value, bResult.value, a, b, state)) { | ||
| hasMatch = matchedIndices[matchIndex] = true; | ||
| hasMatch = matchedIndices[matchIndex] = 1; | ||
| break; | ||
@@ -297,4 +300,4 @@ } | ||
| function areTypedArraysEqual(a, b) { | ||
| let index = a.byteLength; | ||
| if (b.byteLength !== index || a.byteOffset !== b.byteOffset) { | ||
| let index = a.length; | ||
| if (b.length !== index || a.byteOffset !== b.byteOffset) { | ||
| return false; | ||
@@ -301,0 +304,0 @@ } |
+12
-9
@@ -41,3 +41,6 @@ const { getOwnPropertyNames, getOwnPropertySymbols } = Object; | ||
| function getStrictProperties(object) { | ||
| return getOwnPropertyNames(object).concat(getOwnPropertySymbols(object)); | ||
| const symbols = getOwnPropertySymbols(object); | ||
| return symbols.length | ||
| ? getOwnPropertyNames(object).concat(symbols) | ||
| : getOwnPropertyNames(object); | ||
| } | ||
@@ -140,3 +143,3 @@ /** | ||
| } | ||
| const matchedIndices = new Array(size); | ||
| const matchedIndices = new Uint8Array(size); | ||
| const aIterable = a.entries(); | ||
@@ -152,3 +155,3 @@ let aResult; | ||
| const bIterable = b.entries(); | ||
| let hasMatch = false; | ||
| let hasMatch = 0; | ||
| let matchIndex = 0; | ||
@@ -168,3 +171,3 @@ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition | ||
| && state.equals(aEntry[1], bEntry[1], aEntry[0], bEntry[0], a, b, state)) { | ||
| hasMatch = matchedIndices[matchIndex] = true; | ||
| hasMatch = matchedIndices[matchIndex] = 1; | ||
| break; | ||
@@ -258,3 +261,3 @@ } | ||
| } | ||
| const matchedIndices = new Array(size); | ||
| const matchedIndices = new Uint8Array(size); | ||
| const aIterable = a.values(); | ||
@@ -269,3 +272,3 @@ let aResult; | ||
| const bIterable = b.values(); | ||
| let hasMatch = false; | ||
| let hasMatch = 0; | ||
| let matchIndex = 0; | ||
@@ -279,3 +282,3 @@ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition | ||
| && state.equals(aResult.value, bResult.value, aResult.value, bResult.value, a, b, state)) { | ||
| hasMatch = matchedIndices[matchIndex] = true; | ||
| hasMatch = matchedIndices[matchIndex] = 1; | ||
| break; | ||
@@ -295,4 +298,4 @@ } | ||
| function areTypedArraysEqual(a, b) { | ||
| let index = a.byteLength; | ||
| if (b.byteLength !== index || a.byteOffset !== b.byteOffset) { | ||
| let index = a.length; | ||
| if (b.length !== index || a.byteOffset !== b.byteOffset) { | ||
| return false; | ||
@@ -299,0 +302,0 @@ } |
+19
-19
@@ -13,10 +13,10 @@ { | ||
| "@planttheidea/build-tools": "^2.0.0", | ||
| "@types/lodash": "^4.17.21", | ||
| "@types/node": "^24.10.4", | ||
| "@types/lodash": "^4.17.24", | ||
| "@types/node": "^24.13.2", | ||
| "@types/ramda": "^0.31.1", | ||
| "@types/react": "^19.2.7", | ||
| "@types/react": "^19.2.17", | ||
| "@types/react-dom": "^19.2.3", | ||
| "@typescript-eslint/eslint-plugin": "^8.50.0", | ||
| "@typescript-eslint/parser": "^8.50.0", | ||
| "@vitest/coverage-v8": "^4.0.16", | ||
| "@typescript-eslint/eslint-plugin": "^8.63.0", | ||
| "@typescript-eslint/parser": "^8.63.0", | ||
| "@vitest/coverage-v8": "^4.1.10", | ||
| "cli-table3": "^0.6.5", | ||
@@ -27,3 +27,3 @@ "decircularize": "^1.0.0", | ||
| "dequal": "^2.0.3", | ||
| "eslint": "^9.39.2", | ||
| "eslint": "^9.39.4", | ||
| "eslint-friendly-formatter": "^4.0.1", | ||
@@ -33,17 +33,17 @@ "eslint-plugin-import": "^2.32.0", | ||
| "fast-glob": "^3.3.3", | ||
| "lodash": "^4.17.21", | ||
| "lodash": "^4.18.1", | ||
| "nano-equal": "^2.0.2", | ||
| "prettier": "^3.7.4", | ||
| "react": "^19.2.3", | ||
| "react-dom": "^19.2.3", | ||
| "prettier": "^3.9.4", | ||
| "react": "^19.2.7", | ||
| "react-dom": "^19.2.7", | ||
| "react-fast-compare": "^3.2.2", | ||
| "release-it": "^19.1.0", | ||
| "rollup": "^4.53.5", | ||
| "release-it": "^19.2.4", | ||
| "rollup": "^4.62.2", | ||
| "shallow-equal-fuzzy": "^0.0.2", | ||
| "tinybench": "^6.0.0", | ||
| "tinybench": "^6.0.2", | ||
| "typescript": "^5.9.3", | ||
| "typescript-eslint": "^8.50.0", | ||
| "underscore": "^1.13.7", | ||
| "vite": "^7.3.0", | ||
| "vitest": "^4.0.16" | ||
| "typescript-eslint": "^8.63.0", | ||
| "underscore": "^1.13.8", | ||
| "vite": "^7.3.6", | ||
| "vitest": "^4.1.10" | ||
| }, | ||
@@ -115,3 +115,3 @@ "engines": { | ||
| "types": "./index.d.ts", | ||
| "version": "6.0.0" | ||
| "version": "6.0.1" | ||
| } |
103111
0.16%1463
0.41%