From 5651142a60273fedb034467b50fe9d02edd9db6f Mon Sep 17 00:00:00 2001 From: Gnlow Date: Sun, 17 Sep 2023 02:37:45 +0900 Subject: [PATCH] wtff --- deno.json | 3 +-- src/expand.ts | 3 +-- src/func/and.ts | 2 +- src/func/call.ts | 4 ++-- src/func/join.ts | 4 ++-- src/func/math.ts | 2 +- src/func/or.ts | 2 +- src/run.ts | 2 +- src/util/mod.ts | 2 ++ test/arrow.test.ts | 2 +- test/call.test.ts | 2 +- test/expand.test.ts | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) create mode 100644 src/util/mod.ts diff --git a/deno.json b/deno.json index 129cc30..e860f70 100644 --- a/deno.json +++ b/deno.json @@ -6,7 +6,6 @@ "ts-pattern": "npm:ts-pattern@5.0.5", "iteruyo": "https://deno.land/x/iteruyo@v0.3.0/mod.ts", "std/assert": "https://deno.land/std@0.201.0/assert/mod.ts", - "util": "./src/util/mod.ts", - "util/": "./src/util/" + "$util": "./src/util/mod.ts" } } \ No newline at end of file diff --git a/src/expand.ts b/src/expand.ts index 6ce7326..0c7f6cc 100644 --- a/src/expand.ts +++ b/src/expand.ts @@ -3,8 +3,7 @@ import { call, expandable } from "./func/mod.ts" import { match, P } from "ts-pattern" import { $ as Iter } from "iteruyo" -import { $, $a, $b } from "util/select.ts" -import { f } from "util/f.ts" +import { $, $a, $b, f } from "$util" export * from "iteruyo" class LazyArray { diff --git a/src/func/and.ts b/src/func/and.ts index 5f7e19f..d8e1061 100644 --- a/src/func/and.ts +++ b/src/func/and.ts @@ -1,7 +1,7 @@ import { Expr, any } from "../Expr.ts" import { match } from "ts-pattern" -import { $_ } from "util/select.ts" +import { $_ } from "$util" export const and = (a: Expr, b: Expr): Expr => match([a, b]) diff --git a/src/func/call.ts b/src/func/call.ts index 2d949b7..ac4e230 100644 --- a/src/func/call.ts +++ b/src/func/call.ts @@ -10,8 +10,8 @@ import { } from "./math.ts" import { match, P } from "ts-pattern" -import { $, $_, $a, $b } from "util/select.ts" -import { f } from "util/f.ts" +import { $, $_, $a, $b } from "$util" +import { f } from "$util" export const call = (query: Expr, expr: Expr): Expr => { return match([query, expr]) diff --git a/src/func/join.ts b/src/func/join.ts index 69febdf..c4a0bf7 100644 --- a/src/func/join.ts +++ b/src/func/join.ts @@ -1,8 +1,8 @@ import { Expr } from "../Expr.ts" import { match } from "ts-pattern" -import { str$a, str$b } from "util/select.ts" -import { f } from "util/f.ts" +import { str$a, str$b } from "$util" +import { f } from "$util" export const join = (a: Expr, b: Expr): Expr => match([a, b]) diff --git a/src/func/math.ts b/src/func/math.ts index 8a46a45..a891cd0 100644 --- a/src/func/math.ts +++ b/src/func/math.ts @@ -1,7 +1,7 @@ import { Expr } from "../Expr.ts" import { match } from "ts-pattern" -import { num$a, num$b } from "util/select.ts" +import { num$a, num$b } from "$util" const math = (name: string, func: (a: number, b: number) => number) => diff --git a/src/func/or.ts b/src/func/or.ts index 016ed82..db75167 100644 --- a/src/func/or.ts +++ b/src/func/or.ts @@ -1,7 +1,7 @@ import { Expr, any } from "../Expr.ts" import { match } from "ts-pattern" -import { $_ } from "util/select.ts" +import { $_ } from "$util" export const or = (a: Expr, b: Expr): Expr => match([a, b]) diff --git a/src/run.ts b/src/run.ts index 0e033d1..bb83969 100644 --- a/src/run.ts +++ b/src/run.ts @@ -2,7 +2,7 @@ import { Expr } from "./Expr.ts" import { and, call } from "./func/mod.ts" import { match, P } from "ts-pattern" -import { $, $a, $b } from "util/select.ts" +import { $, $a, $b } from "$util" export const run = (expr: Expr): Expr => { return match(expr) diff --git a/src/util/mod.ts b/src/util/mod.ts new file mode 100644 index 0000000..3088073 --- /dev/null +++ b/src/util/mod.ts @@ -0,0 +1,2 @@ +export * from "./f.ts" +export * from "./select.ts" diff --git a/test/arrow.test.ts b/test/arrow.test.ts index 6670d34..dd4d44d 100644 --- a/test/arrow.test.ts +++ b/test/arrow.test.ts @@ -4,7 +4,7 @@ import { } from "std/assert" import { call, any } from "../src/mod.ts" -import { f } from "util/f.ts" +import { f } from "$util" Deno.test("Arrow - Match Literal", () => { assertEquals( diff --git a/test/call.test.ts b/test/call.test.ts index a5436e9..e2cc378 100644 --- a/test/call.test.ts +++ b/test/call.test.ts @@ -4,7 +4,7 @@ import { } from "std/assert" import { call, any } from "../src/mod.ts" -import { f } from "util/f.ts" +import { f } from "$util" Deno.test("Call - Ref - And", () => { assertEquals( diff --git a/test/expand.test.ts b/test/expand.test.ts index 9a0d4fc..44db5b3 100644 --- a/test/expand.test.ts +++ b/test/expand.test.ts @@ -1,7 +1,7 @@ import { assertEquals } from "std/assert" import { Expr, expand, $ as Iter, any } from "../src/mod.ts" -import { f } from "util/f.ts" +import { f } from "$util" Deno.test("Expand - Literal", () => { assertEquals(