lib/cf-resources/lambda-version-resource/index.js
function getFunctionVersions(name, marker) {
    // Grab functions
    return new Promise((resolve, reject) => {
        lambda.listVersionsByFunction({
            FunctionName: name,
            Marker: marker
        }, function(err, data) {
            if (err) return reject(err);

            // Check if we can grab even more
            if (data.NextMarker) {
                return getFunctionVersions(name, data.NextMarker).then((versions) => {
                    resolve(data.Versions.concat(versions));
                });
            }

            resolve(data.Versions);
        });
    });
}
function getFunctionVersions(name, marker) {
    // Grab functions
    return new Promise((resolve, reject) => {
        lambda.listVersionsByFunction({
            FunctionName: name,
            Marker: marker
        }, function(err, data) {
            if (err) return reject(err);

            // Check if we can grab even more
            if (data.NextMarker) {
                return getFunctionVersions(name, data.NextMarker).then((versions) => {
                    resolve(data.Versions.concat(versions));
                });
            }

            resolve(data.Versions);
        });
    });
}
function getFunctionVersions ( name , marker ) { // Grab functions return new Promise ( ( resolve , reject ) => { lambda . listVersionsByFunction ( { FunctionName : name , Marker : marker } , function ( err , data ) { if ( err ) return reject ( err ) ; // Check if we can grab even more if ( data . NextMarker ) { return getFunctionVersions ( name , data . NextMarker ) . then ( ( versions ) => { resolve ( data . Versions . concat ( versions ) ) ; } ) ; } resolve ( data . Versions ) ; } ) ; } ) ; }
Get all function versions

@return {Promise} which resolves into an array of version configurations
Get all function versions