core/controller/controller.js
function (code) {
            var list = {}, cde = 'short', name = null;

            if ( typeof(code) != 'undefined' && typeof(userLocales[0][code]) == 'string' ) {
                cde = code
            } else if ( typeof(code) != 'undefined' ) (
                console.warn('`'+ code +'` not supported : sticking with `short` code')
            )

            for ( var i = 0, len = userLocales.length; i< len; ++i ) {

                if (userLocales[i][cde]) {

                    name = userLocales[i].full || userLocales[i].officialName.short;

                    if ( name )
                        list[ userLocales[i][cde] ] = name;
                }
            }

            return list
        }
function (code) {
            var list = {}, cde = 'short', name = null;

            if ( typeof(code) != 'undefined' && typeof(userLocales[0][code]) == 'string' ) {
                cde = code
            } else if ( typeof(code) != 'undefined' ) (
                console.warn('`'+ code +'` not supported : sticking with `short` code')
            )

            for ( var i = 0, len = userLocales.length; i< len; ++i ) {

                if (userLocales[i][cde]) {

                    name = userLocales[i].full || userLocales[i].officialName.short;

                    if ( name )
                        list[ userLocales[i][cde] ] = name;
                }
            }

            return list
        }
function ( code ) { var list = { } , cde = 'short' , name = null ; if ( typeof ( code ) != 'undefined' && typeof ( userLocales [ 0 ] [ code ] ) == 'string' ) { cde = code } else if ( typeof ( code ) != 'undefined' ) ( console . warn ( '`' + code + '` not supported : sticking with `short` code' ) ) for ( var i = 0 , len = userLocales . length ; i < len ; ++ i ) { if ( userLocales [ i ] [ cde ] ) { name = userLocales [ i ] . full || userLocales [ i ] . officialName . short ; if ( name ) list [ userLocales [ i ] [ cde ] ] = name ; } } return list }
Get countries list

@param {string} [code] - e.g.: short, long, fifa, m49

@return {object} countries - countries code & value list
Get countries list