dist/bbn.js
/**
     * Logs the given arguments in the browser's console.
     * @method   log
     * @global   
     * @example
     * ```javascript
     * //'hello'
     * bbn.fn.log('hello');
     * ```  
     * @memberof bbn.fn
     * @param    {...any} args 
     * @returns       
     */
Logs the given arguments in the browser's console.
Logs the given arguments in the browser ' s console .
log(...args){
      if ( window.console !== undefined ){
        let cfg,
            level = 5;
        if ( args[0] && (typeof args[0] === 'object') && args[0]._bbn_console_style){
          cfg = args[0]._bbn_console_style;
          level = args[0]._bbn_console_level;
          args.shift();
        }
        else{
          cfg = "background: #EEE; color: #666; font-size: 12px";
        }
        if ( bbn.env.loggingLevel >= level  ){
          let i = 0;
          while (i < args.length ){
            let t = typeof args[i];
            if ( (t === 'string') || (t === 'number') ){
              window.console.log("%c %s ", cfg, args[i]);
            }
            else{
              window.console.log(args[i]);
            }
            i++;
          }
        }
      }
      return this;
    }
log ( ... args ) { if ( window . console !== undefined ) { let cfg , level = 5 ; if ( args [ 0 ] && ( typeof args [ 0 ] === 'object' ) && args [ 0 ] . _bbn_console_style ) { cfg = args [ 0 ] . _bbn_console_style ; level = args [ 0 ] . _bbn_console_level ; args . shift ( ) ; } else { cfg = "background: #EEE; color: #666; font-size: 12px" ; } if ( bbn . env . loggingLevel >= level ) { let i = 0 ; while ( i < args . length ) { let t = typeof args [ i ] ; if ( ( t === 'string' ) || ( t === 'number' ) ) { window . console . log ( "%c %s " , cfg , args [ i ] ) ; } else { window . console . log ( args [ i ] ) ; } i ++ ; } } } return this ; }
Logs the given arguments in the browser's console.
Logs the given arguments in the browser ' s console .