/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
ext/node/polyfills/internal/http.ts
44 строки
853 B
Nathan Whitaker
perf: lazy-load more modules in the snapshot (#34061)
19 май 2026, 02:37
Не верифицирован
19 май 2026, 02:37
eb4061f
Код
Авторство
О чём код?
// Copyright 2018-2026 the Deno authors. MIT license. // Copyright Joyent and Node contributors. All rights reserved. MIT license. (function () { const { core, primordials } = __bootstrap; const { Date, DatePrototypeToUTCString, DatePrototypeGetMilliseconds, Symbol, } = primordials; let utcCache: string | undefined; function utcDate() { if (!utcCache) cache(); return utcCache; } function cache() { const d = new Date(); utcCache = DatePrototypeToUTCString(d); core.createSystemTimer(resetCache, 1000 - DatePrototypeGetMilliseconds(d)); } function resetCache() { utcCache = undefined; } const kOutHeaders = Symbol("kOutHeaders"); const kNeedDrain = Symbol("kNeedDrain"); const _defaultExport = { utcDate, kOutHeaders, kNeedDrain, }; return { utcDate, kOutHeaders, kNeedDrain, default: _defaultExport, }; })();