lib/main.js
function() {
        return new Promise(function(resolve, reject) {
            try{
                resolve(library.listSourceLanguagesLastModified());
            } catch (err) {
                reject(err);
            }
        }).then(function(languages) {
            return listResourceContainers()
                .then(function(results) {
                    // flatten modified_at
                    let local = {};
                    for(let info of results) {
                        try {
                            if(!local[info.language.slug]) local[info.language.slug] = -1;
                            let old = local[info.language.slug];
                            local[info.language.slug] = info.modified_at > old ? info.modified_at : old;
                        } catch (err) {
                            console.error(err);
                        }
                    }
                    return inferUpdates(local, languages);
                });
        });
    }
function() {
        return new Promise(function(resolve, reject) {
            try{
                resolve(library.listSourceLanguagesLastModified());
            } catch (err) {
                reject(err);
            }
        }).then(function(languages) {
            return listResourceContainers()
                .then(function(results) {
                    // flatten modified_at
                    let local = {};
                    for(let info of results) {
                        try {
                            if(!local[info.language.slug]) local[info.language.slug] = -1;
                            let old = local[info.language.slug];
                            local[info.language.slug] = info.modified_at > old ? info.modified_at : old;
                        } catch (err) {
                            console.error(err);
                        }
                    }
                    return inferUpdates(local, languages);
                });
        });
    }
function ( ) { return new Promise ( function ( resolve , reject ) { try { resolve ( library . listSourceLanguagesLastModified ( ) ) ; } catch ( err ) { reject ( err ) ; } } ) . then ( function ( languages ) { return listResourceContainers ( ) . then ( function ( results ) { // flatten modified_at let local = { } ; for ( let info of results ) { try { if ( ! local [ info . language . slug ] ) local [ info . language . slug ] = - 1 ; let old = local [ info . language . slug ] ; local [ info . language . slug ] = info . modified_at > old ? info . modified_at : old ; } catch ( err ) { console . error ( err ) ; } } return inferUpdates ( local , languages ) ; } ) ; } ) ; }
Returns a list of source languages that are eligible for updates.

@returns {Promise.<Array>} An array of slugs
Returns a list of source languages that are eligible for updates .