function flatten()

in core/src/main/resources/org/apache/karaf/webconsole/core/behavior/dracula/seedrandom.js [206:216]


function flatten(obj, depth, result, prop) {
  result = [];
  if (depth && typeof(obj) == 'object') {
    for (prop in obj) {
      if (prop.indexOf('S') < 5) {    // Avoid FF3 bug (local/sessionStorage)
        try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}
      }
    }
  }
  return result.length ? result : '' + obj;
}