export class Objects { public static isObject ( object ) { return typeof object === 'object' && object !== null ; } public static sortByKeys ( object , callable ? ) { const sorted = { } ; if ( callable ) { Object . keys ( object ) . sort ( callable ) . forEach ( ( key ) => { sorted [ key ] = object [ key ] ; } ) ; } else { Object . keys ( object ) . sort ( ) . forEach ( ( key ) => { sorted [ key ] = object [ key ] ; } ) ; } return sorted ; } }