public static function fd($object, $type = 'log')
    {
        $types = array('log', 'debug', 'info', 'warn', 'error', 'assert');

        if (!\in_array($type, $types, true)) {
            $type = 'log';
        }

        $data = json_encode($object);

        echo '<script type="text/javascript">console.' . $type . '(' . $data . ');</script>';
    }