File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,15 +95,15 @@ export const makeOptions = (version: string): BuildOptions => ({
9595 name : "@httpland/accept-ranges-parser" ,
9696 version : "1.0.0" ,
9797 } ,
98- "https://deno.land/x/prelude_js@1.0.0/trim.ts" : {
99- name : "@miyauci/prelude" ,
100- version : "1.0.0" ,
101- subPath : "trim" ,
102- } ,
10398 "https://deno.land/x/prelude_js@1.0.0/to_lower_case.ts" : {
10499 name : "@miyauci/prelude" ,
105100 version : "1.0.0" ,
106101 subPath : "to_lower_case" ,
107102 } ,
103+ "https://deno.land/x/http_utils@1.2.0/list.ts" : {
104+ name : "@httpland/http-utils" ,
105+ version : "1.2.0" ,
106+ subPath : "list.js" ,
107+ } ,
108108 } ,
109109} ) ;
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ export { isNull } from "https://deno.land/x/isx@1.1.1/is_null.ts";
1212export { isString } from "https://deno.land/x/isx@1.1.1/is_string.ts" ;
1313export { isNumber } from "https://deno.land/x/isx@1.1.1/is_number.ts" ;
1414export { isNegativeNumber } from "https://deno.land/x/isx@1.1.1/number/is_negative_number.ts" ;
15- export { trim } from "https://deno.land/x/prelude_js@1.0.0/trim.ts" ;
1615export { toLowerCase } from "https://deno.land/x/prelude_js@1.0.0/to_lower_case.ts" ;
1716export {
1817 type Handler ,
@@ -57,6 +56,7 @@ export {
5756 parseAcceptRanges ,
5857 type Token ,
5958} from "https://deno.land/x/accept_ranges_parser@1.0.0/mod.ts" ;
59+ export { parseListFields } from "https://deno.land/x/http_utils@1.2.0/list.ts" ;
6060
6161export function not < T extends readonly unknown [ ] > (
6262 fn : ( ...args : T ) => boolean ,
Original file line number Diff line number Diff line change 33
44// TODO(miyauci): External Packaging
55
6- import { type ETag , parseETag , trim } from "./deps.ts" ;
6+ import { type ETag , parseETag , parseListFields } from "./deps.ts" ;
77
88export type IfMatch = Star | ETag [ ] ;
99export type IfNoneMatch = IfMatch ;
@@ -15,9 +15,5 @@ export type Star = "*";
1515export function parse ( input : string ) : IfMatch | IfNoneMatch {
1616 if ( input === "*" ) return input ;
1717
18- return input
19- . split ( "," )
20- . map ( trim )
21- . filter ( Boolean )
22- . map ( parseETag ) ;
18+ return parseListFields ( input ) . map ( parseETag ) ;
2319}
You can’t perform that action at this time.
0 commit comments