Skip to content

Commit

Permalink
remove: assertIsEntry() (#477)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurab-khanal authored Sep 2, 2023
1 parent b108da2 commit 5580e4e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions utils/db.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Copyright 2023 the Deno authors. All rights reserved. MIT license.
import { assertNotEquals } from "std/testing/asserts.ts";
import { chunk } from "std/collections/chunk.ts";

const KV_PATH_KEY = "KV_PATH";
Expand Down Expand Up @@ -36,12 +35,6 @@ async function getManyValues<T>(
.map((entry) => entry?.value);
}

export function assertIsEntry<T>(
entry: Deno.KvEntryMaybe<T>,
): asserts entry is Deno.KvEntry<T> {
assertNotEquals(entry.value, null, `KV entry not found: ${entry.key}`);
}

/** Gets all dates since a given number of milliseconds ago */
export function getDatesSince(msAgo: number) {
const dates = [];
Expand Down

0 comments on commit 5580e4e

Please sign in to comment.