summaryrefslogtreecommitdiff
path: root/source/libs/fetch-dom.ts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/libs/fetch-dom.ts7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/libs/fetch-dom.ts b/source/libs/fetch-dom.ts
index f1a921fe..251c20af 100644
--- a/source/libs/fetch-dom.ts
+++ b/source/libs/fetch-dom.ts
@@ -1,8 +1,5 @@
import domify from 'doma';
-import pMemoize from 'p-memoize';
-
-// TODO: wait for https://github.com/sindresorhus/p-memoize/issues/9
-const memo = pMemoize as <T = VoidFunction>(fn: T) => T;
+import mem from 'mem';
async function fetchDom(url: string): Promise<DocumentFragment>;
async function fetchDom<TElement extends Element>(url: string, selector: string): Promise<TElement>;
@@ -13,4 +10,4 @@ async function fetchDom(url: string, selector?: string): Promise<Node> {
return selector ? dom.querySelector(selector)! : dom;
}
-export default memo(fetchDom);
+export default mem(fetchDom);