Browse Source

style(fileexport): remove commented code

bergquist 10 years ago
parent
commit
d3f90dcfcc
1 changed files with 1 additions and 38 deletions
  1. 1 38
      public/app/core/utils/file_export.ts

+ 1 - 38
public/app/core/utils/file_export.ts

@@ -34,41 +34,4 @@ export function exportTableDataToCsv(table) {
 export function saveSaveBlob(payload, fname) {
     var blob = new Blob([payload], { type: "text/csv;charset=utf-8" });
     window.saveAs(blob, fname);
-};
-
-/*
-export default function flatten(target, opts): any {
-    opts = opts || {};
-
-    var delimiter = opts.delimiter || '.';
-    var maxDepth = opts.maxDepth || 3;
-    var currentDepth = 1;
-    var output = {};
-
-    function step(object, prev) {
-        Object.keys(object).forEach(function(key) {
-            var value = object[key];
-            var isarray = opts.safe && Array.isArray(value);
-            var type = Object.prototype.toString.call(value);
-            var isobject = type === "[object Object]";
-
-            var newKey = prev ? prev + delimiter + key : key;
-
-            if (!opts.maxDepth) {
-                maxDepth = currentDepth + 1;
-            }
-
-            if (!isarray && isobject && Object.keys(value).length && currentDepth < maxDepth) {
-                ++currentDepth;
-                return step(value, newKey);
-            }
-
-            output[newKey] = value;
-        });
-    }
-
-    step(target, null);
-
-    return output;
-}
-*/
+};