Skip to content

Commit 862fbc1

Browse files
author
mayank.kushwah
committed
enhancement: update console log
1 parent 3f5a58b commit 862fbc1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

snippets/js.code-snippets

+8-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"console.log": {
2525
"prefix": "_console",
2626
"body": [
27-
"console.log(`%c ${data}`, 'font-size:50px; color: red;');"
27+
"console.log(`%c Data :: ${data}`, `font-size:25px; color: #${Math.floor(Math.random() * 16777215).toString(16)};`);"
2828
],
2929
"description": "Logs a message to the browser console with custom formatting."
3030
},
@@ -34,5 +34,12 @@
3434
"console.table(data);"
3535
],
3636
"description": "Logs a message to the browser console with custom formatting."
37+
},
38+
"console.trace": {
39+
"prefix": "_console.trace",
40+
"body": [
41+
"console.trace();"
42+
],
43+
"description": "Trace where the function was called"
3744
}
3845
}

0 commit comments

Comments
 (0)