export class Contributor { public static PRESENT = 'present' ; firstName : string ; name : string ; from : string ; to : string ; githubId : string ; position : string ; public static compare ( a , b ) { let compare ; compare = a . to . localeCompare ( b . to ) ; if ( compare !== 0 ) { if ( a . to === Contributor . PRESENT ) { return - 1 ; } else if ( b . to === Contributor . PRESENT ) { return 1 ; } else { return ( compare * - 1 ) ; } } compare = a . from . localeCompare ( b . from ) ; if ( compare !== 0 ) { return compare ; } compare = a . position . localeCompare ( b . position ) ; if ( compare !== 0 ) { if ( a . position === 'Lecturer' ) { return - 1 ; } else { return 1 ; } } compare = a . name . localeCompare ( b . name ) ; if ( compare !== 0 ) { return compare ; } compare = a . firstName . localeCompare ( b . firstName ) ; return compare ; } constructor ( firstName , name , from , position , githubId = '' , to = Contributor . PRESENT ) { this . firstName = firstName ; this . name = name ; this . from = from ; this . position = position ; this . githubId = githubId ; this . to = to ; } }