Development (#11)

We need this NOW.

---------

Co-authored-by: PineaFan <ash@pinea.dev>
Co-authored-by: pineafan <pineapplefanyt@gmail.com>
Co-authored-by: PineappleFan <PineaFan@users.noreply.github.com>
Co-authored-by: Skyler <skyler3665@gmail.com>
diff --git a/src/utils/getEmojiByName.ts b/src/utils/getEmojiByName.ts
index 3fa2b53..9df17a4 100644
--- a/src/utils/getEmojiByName.ts
+++ b/src/utils/getEmojiByName.ts
@@ -1,5 +1,7 @@
 import emojis from "../config/emojis.json" assert { type: "json" };
+import lodash from 'lodash';
 
+const isArray = lodash.isArray;
 interface EmojisIndex {
     [key: string]: string | EmojisIndex | EmojisIndex[];
 }
@@ -12,7 +14,7 @@
         if (typeof id === "string" || id === undefined) {
             throw new Error(`Emoji ${name} not found`);
         }
-        if (Array.isArray(id)) {
+        if (isArray(id)) {
             id = id[parseInt(part)];
         } else {
             id = id[part];
@@ -21,6 +23,10 @@
     if (typeof id !== "string" && id !== undefined) {
         throw new Error(`Emoji ${name} not found`);
     }
+    return getEmojiFromId(id, format);
+}
+
+function getEmojiFromId(id: string | undefined, format?: string): string {
     if (format === "id") {
         if (id === undefined) return "0";
         return id.toString();