diff --git a/crypto/_fnv/index.ts b/crypto/_fnv/mod.ts similarity index 86% rename from crypto/_fnv/index.ts rename to crypto/_fnv/mod.ts index 1fad4d2c2709..f8be267a33ab 100644 --- a/crypto/_fnv/index.ts +++ b/crypto/_fnv/mod.ts @@ -4,7 +4,7 @@ import { fnv32, fnv32a } from "./fnv32.ts"; import { fnv64, fnv64a } from "./fnv64.ts"; -export const fnv = (name: string, buf: Uint8Array | undefined): ArrayBuffer => { +export function fnv(name: string, buf?: Uint8Array): ArrayBuffer { if (!buf) { throw new TypeError("no data provided for hashing"); } @@ -21,4 +21,4 @@ export const fnv = (name: string, buf: Uint8Array | undefined): ArrayBuffer => { default: throw new TypeError(`unsupported fnv digest: ${name}`); } -}; +} diff --git a/crypto/crypto.ts b/crypto/crypto.ts index d3a71b7971ec..0c7592a65158 100644 --- a/crypto/crypto.ts +++ b/crypto/crypto.ts @@ -175,7 +175,7 @@ import { instantiateWasm, } from "./_wasm/mod.ts"; import { timingSafeEqual } from "./timing_safe_equal.ts"; -import { fnv } from "./_fnv/index.ts"; +import { fnv } from "./_fnv/mod.ts"; /** * A copy of the global WebCrypto interface, with methods bound so they're