forked from AdguardTeam/Scriptlets
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlog.js
More file actions
29 lines (27 loc) · 650 Bytes
/
log.js
File metadata and controls
29 lines (27 loc) · 650 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**
* @scriptlet log
*
* @description
* A simple scriptlet which only purpose is to print arguments to console.
* This scriptlet can be helpful for debugging and troubleshooting other scriptlets.
*
* Related ABP source:
* https://gitlab.com/eyeo/snippets/-/blob/main/source/introspection/log.js
*
* ### Examples
*
* ```adblock
* example.org#%#//scriptlet('log', 'arg1', 'arg2')
* ```
*
* @added v1.0.4.
*/
export function log(...args) {
console.log(args); // eslint-disable-line no-console
}
export const logNames = [
'log',
'abp-log',
];
// eslint-disable-next-line prefer-destructuring
log.primaryName = logNames[0];