Skip to content

Instantly share code, notes, and snippets.

View anurbol's full-sized avatar
:octocat:

Nurbol Alpysbayev anurbol

:octocat:
View GitHub Profile
["log", "warn", "error"].forEach((methodName) => {
const originalMethod = console[methodName]
console[methodName] = (...args) => {
let initiator = "unknown place"
try {
throw new Error()
} catch (e) {
if (typeof e.stack === "string") {
let isFirst = true
for (const line of e.stack.split("\n")) {