src/audit/_sync-role.js
function removes(result, callback) {
                let fns = result.AttachedPolicies.map(p=> {
                  return function maybeRemove(callback) {
                    let PolicyArn = p.PolicyArn
                    if (policies.includes(PolicyArn)) {
                      callback()
                    }
                    else {
                      iam.detachRolePolicy({
                        RoleName,
                        PolicyArn
                      }, callback)
                    }
                  }
                })
                series(fns, callback)
              }
function removes(result, callback) {
                let fns = result.AttachedPolicies.map(p=> {
                  return function maybeRemove(callback) {
                    let PolicyArn = p.PolicyArn
                    if (policies.includes(PolicyArn)) {
                      callback()
                    }
                    else {
                      iam.detachRolePolicy({
                        RoleName,
                        PolicyArn
                      }, callback)
                    }
                  }
                })
                series(fns, callback)
              }
function removes ( result , callback ) { let fns = result . AttachedPolicies . map ( p => { return function maybeRemove ( callback ) { let PolicyArn = p . PolicyArn if ( policies . includes ( PolicyArn ) ) { callback ( ) } else { iam . detachRolePolicy ( { RoleName , PolicyArn } , callback ) } } } ) series ( fns , callback ) }
if not in the list remove it
if not in the list remove it