nl_tokens: Add plugin function . Plugin function must return array with log argument values .
pl_tokens: function addPlugin ( useLevel , fn ) { let pluginFn = fn ; if ( typeof fn === 'undefined' && typeof useLevel === 'function' ) { pluginFn = useLevel ; } if ( typeof pluginFn !== 'function' ) { throw new <mask> ( 'Plugin must be a function!' ) ; } if ( typeof useLevel === 'string' ) { pluginFn = ( id , level , stats , ... rest ) => { if ( level === useLevel . toUpperCase ( ) ) { return fn ( id , level , stats , ... rest ) ; } return [ id , level , stats , ... rest ] ; } ; } pluginsRegistry . push ( pluginFn ) ; }