Skip to content

Commit a71f444

Browse files
authored
feat: add option 'allowConsoleClears'
1 parent f115d56 commit a71f444

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: src/utils.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export const draf = (cb) => requestAnimationFrame(() => requestAnimationFrame(cb
44

55
export const defaultOptions = {
66
auto: true,
7+
allowConsoleClears: true,
78
clearConsoleOnUpdate: false,
89
delay: 500,
910
config: {
@@ -31,7 +32,9 @@ export const defaultOptions = {
3132
export function clear (forceClear = false, options) {
3233
resetCache()
3334
if (forceClear || options.clearConsoleOnUpdate) {
34-
console.clear()
3535
resetLastNotification()
36+
if (options.allowConsoleClears) {
37+
console.clear()
38+
}
3639
}
3740
}

0 commit comments

Comments
 (0)