1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Chore: Add eslint rule to enforce strict equality (eqeqeq)

This commit is contained in:
Laurent Cozic
2022-07-23 09:31:32 +02:00
parent 8a8def39f0
commit 052d9f03d6
62 changed files with 496 additions and 497 deletions

View File

@@ -18,7 +18,7 @@ export const binarySearch = function(items: any[], value: any) {
stopIndex = items.length - 1,
middle = Math.floor((stopIndex + startIndex) / 2);
while (items[middle] != value && startIndex < stopIndex) {
while (items[middle] !== value && startIndex < stopIndex) {
// adjust search area
if (value < items[middle]) {
stopIndex = middle - 1;
@@ -31,7 +31,7 @@ export const binarySearch = function(items: any[], value: any) {
}
// make sure it's the right value
return items[middle] != value ? -1 : middle;
return items[middle] !== value ? -1 : middle;
};
export const findByKey = function(array: any[], key: any, value: any) {