import { BasicHeapObject , HeapObject , KeyValuePairHeapObject , SequenceHeapObject } from '@app/models' ; export function basicHeapObjectValue ( obj ) { return obj . renderType === 'basic' ; } export function sequenceHeapObjectValue ( obj ) { return obj . renderType === 'sequence' ; } export function kvpHeapObjectValue ( obj ) { return obj . renderType === 'kvp' ; } export function sortHeapObject ( items ) { return [ ... items ] . sort ( ( a , b ) => { if ( a . sequence < b . sequence ) { return - 1 ; } if ( a . sequence > b . sequence ) { return 1 ; } return a . id < b . id ? - 1 : 1 ; } ) ; }