Skip to content

Commit c4e8f4c

Browse files
committed
refactor(deps): use external module
1 parent 90a7a37 commit c4e8f4c

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

_tools/meta.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,15 @@ export const makeOptions = (version: string): BuildOptions => ({
9898
name: "@httpland/accept-ranges-parser",
9999
version: "1.0.0",
100100
},
101+
"https://deno.land/x/prelude_js@1.0.0/trim.ts": {
102+
name: "@miyauci/prelude",
103+
version: "1.0.0",
104+
subPath: "trim",
105+
},
106+
"https://deno.land/x/prelude_js@1.0.0/to_lower_case.ts": {
107+
name: "@miyauci/prelude",
108+
version: "1.0.0",
109+
subPath: "to_lower_case",
110+
},
101111
},
102112
});

deps.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export { isNumber } from "https://deno.land/x/isx@1.1.1/is_number.ts";
1414
export { isNegativeNumber } from "https://deno.land/x/isx@1.1.1/number/is_negative_number.ts";
1515
export { isValidDate } from "https://deno.land/x/isx@1.1.1/date/is_valid_date.ts";
1616
export { trim } from "https://deno.land/x/prelude_js@1.0.0/trim.ts";
17+
export { toLowerCase } from "https://deno.land/x/prelude_js@1.0.0/to_lower_case.ts";
1718
export {
1819
type Handler,
1920
type Middleware,

utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
Status,
1818
SuccessfulStatus,
1919
type Token,
20+
toLowerCase,
2021
} from "./deps.ts";
2122
import type { Precondition } from "./types.ts";
2223

@@ -102,7 +103,7 @@ export function withoutConditionHeaders(
102103
additionalConditionHeaders: readonly string[] = [],
103104
): Headers {
104105
additionalConditionHeaders = distinct(additionalConditionHeaders)
105-
.map((v) => v.toLowerCase());
106+
.map(toLowerCase);
106107

107108
function isBannedHeader(key: string): boolean {
108109
return isConditionalHeader(key) ||

0 commit comments

Comments
 (0)