added doga

This commit is contained in:
szabomarton
2025-02-25 09:55:29 +01:00
parent 5174ab4cc4
commit 13254e5623
1149 changed files with 80161 additions and 0 deletions

15
25_02_24/node_modules/@tinyhttp/send/dist/utils.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
import { Stats } from 'node:fs';
import { format, parse } from '@tinyhttp/content-type';
import { eTag } from '@tinyhttp/etag';
export const createETag = (body, encoding) => {
if (body instanceof Stats) {
return eTag(body, { weak: true });
}
return eTag(!Buffer.isBuffer(body) ? Buffer.from(body, encoding) : body, { weak: true });
};
export function setCharset(type, charset) {
const parsed = parse(type);
parsed.parameters.charset = charset;
return format(parsed);
}
//# sourceMappingURL=utils.js.map