Sorts the method and property names

This commit is contained in:
leekelleher
2024-05-13 18:09:51 +01:00
parent 57f6089c59
commit c63e65b49e

View File

@@ -71,7 +71,7 @@ function contextItemData(contextInstance: any): UmbDebugContextItemData {
}
}
contextItemData = { ...contextItemData, properties: props };
contextItemData = { ...contextItemData, properties: props.sort((a, b) => a.key.localeCompare(b.key)) };
}
} else {
contextItemData = { ...contextItemData, type: 'primitive', value: contextInstance };
@@ -98,7 +98,7 @@ function getClassMethodNames(klass: any) {
const allMethods =
typeof klass.prototype === 'undefined' ? distinctDeepFunctions(klass) : Object.getOwnPropertyNames(klass.prototype);
return allMethods.filter((name: any) => name !== 'constructor' && !name.startsWith('_'));
return allMethods.filter((name: any) => name !== 'constructor' && !name.startsWith('_')).sort();
}
export interface UmbDebugContextData {