import { ascend, descend, prop, sortWith } from 'ramda'; import { isDefaultProject, isLocalProject, isRemoteProject, Project } from '../project'; export const sortProjects = >(projects: T[]) => sortWith([ descend(isDefaultProject), descend(isLocalProject), descend(isRemoteProject), ascend(prop('name')), ], projects);