ui5_easy_use
Version:
CLI tool for SAP ui5 and SAPUI5 projects to initialize apps, generate pages, insert form and table components, manage routing, and automate i18n bindings
27 lines (21 loc) • 556 B
JavaScript
sap.ui.define([], function () {
"use strict";
return class Helper {
constructor(component) {
this._componentJS = component;
}
getAllKeys(obj, prefix = "") {
if (!this._isObject(obj)) {
return [];
}
return Object.entries(obj).flatMap(([key, value]) =>
this._isObject(value)
? this.getAllKeys(value, `${prefix}${key}.`)
: `${prefix}${key}`
);
}
_isObject(value) {
return typeof value === "object" && value !== null && !Array.isArray(value);
}
};
});