deno.land / std@0.157.0 / http / util.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license./** Returns true if the etags match. Weak etag comparisons are handled. */export function compareEtag(a: string, b: string): boolean { if (a === b) { return true; } if (a.startsWith("W/") && !b.startsWith("W/")) { return a.slice(2) === b; } if (!a.startsWith("W/") && b.startsWith("W/")) { return a === b.slice(2); } return false;}
std

Version Info

Tagged at
a year ago