From 19e3224b7b2a6216ff0bdac7f4b8d19e95355c41 Mon Sep 17 00:00:00 2001 From: Hao Peng Date: Mon, 11 Mar 2024 12:21:21 +0000 Subject: [PATCH] feat: jsr --- deno.json | 5 +++++ src/index.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 deno.json diff --git a/deno.json b/deno.json new file mode 100644 index 0000000..4de37b9 --- /dev/null +++ b/deno.json @@ -0,0 +1,5 @@ +{ + "name": "@citrus327/match", + "version": "1.0.0", + "exports": "./src/index.ts" +} \ No newline at end of file diff --git a/src/index.ts b/src/index.ts index 12f9d57..0013d9f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,7 +10,7 @@ type Matchers = (Matcher | FallbackMatcher)[] export const match = ( target: T, matchers: Matchers, -) => { +): R | undefined => { const [fallback, rest] = partition(matchers, (matcher) => { const [identifier] = matcher return identifier === _