/
githubmirror
/
next.js
Обзор
Документация
Войти
/
githubmirror
/
next.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
canary
test/e2e/app-dir/cache-components-errors/fixtures/console-patch/patch-console.js
12 строк
294 B
Josh Story
[Cache Components] Allow sync IO inside console methods (#83843)
18 сен 2025, 18:23
Не верифицирован
18 сен 2025, 18:23
a0e5996
Код
Авторство
О чём код?
const originalLog = console.log.bind(console) console.log = (...args) => { new Date() Math.random() if (typeof args[0] === 'string') { const firstArg = '[<timestamp>] ' + args[0] originalLog(firstArg, ...args.slice(1)) } else { originalLog('[<timestamp>] ', ...args) } }