From 4dc72ae0e0cd99b03253f59b04cfb6fead53e7d7 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Mon, 15 Apr 2019 09:32:20 -0700 Subject: [PATCH] Clean up arrayEquals --- js/hotkeys.ts | 1 - js/utils.ts | 3 --- 2 files changed, 4 deletions(-) diff --git a/js/hotkeys.ts b/js/hotkeys.ts index 635a8096..064ca2cd 100644 --- a/js/hotkeys.ts +++ b/js/hotkeys.ts @@ -18,7 +18,6 @@ import { import { TOGGLE_TIME_MODE, TOGGLE_LLAMA_MODE } from "./actionTypes"; -import { arraysAreEqual } from "./utils"; import { Dispatch } from "./types"; const IGNORE_EVENTS_FROM_TAGS = new Set(["input", "textarea", "select"]); diff --git a/js/utils.ts b/js/utils.ts index 6b2710fb..c9e76d66 100644 --- a/js/utils.ts +++ b/js/utils.ts @@ -180,9 +180,6 @@ export function segment( return newValues[percentToIndex(ratio, newValues.length)]; } -export const arraysAreEqual = (a: any[], b: any[]): boolean => - a.length === b.length && a.every((value, i) => value === b[i]); - // https://bost.ocks.org/mike/shuffle/ // Shuffle an array in O(n) export function shuffle(array: T[]): T[] {