initial files
This commit is contained in:
24
public/helpers/fileHelper.js
Normal file
24
public/helpers/fileHelper.js
Normal file
@@ -0,0 +1,24 @@
|
||||
module.exports = {
|
||||
// objectTree: function(context, options) {
|
||||
// let ret = '';
|
||||
|
||||
// if (context === null || context === undefined) return ret;
|
||||
|
||||
// if (Array.isArray(context)) {
|
||||
// context.forEach((item, index) => {
|
||||
// ret += options.fn({ key: index, value: item });
|
||||
// });
|
||||
// } else if (typeof context === 'object') {
|
||||
// for (const key in context) {
|
||||
// if (context.hasOwnProperty(key)) {
|
||||
// ret += options.fn({ key, value: context[key] });
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// // primitive Werte
|
||||
// ret += options.fn({ key: null, value: context });
|
||||
// }
|
||||
|
||||
// return ret;
|
||||
// }
|
||||
}
|
||||
Reference in New Issue
Block a user