import SonarQubeApiScm from "../SonarQubeApiScm" ; export default class BaseScmCalculatorService { protected groupBy ( measures , callback ) { const map = new Map ( ) ; measures . forEach ( ( item ) => { const key = callback ( item ) ; if ( ! map . has ( key ) ) { map . set ( key , [ item ] ) ; } else { map . get ( key ) . push ( item ) ; } } ) ; return map ; } }