Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/node_modules.9/mongoose/lib/helpers/model/
Upload File :
Current File : /home/infinitibizsol/.trash/node_modules.9/mongoose/lib/helpers/model/pushNestedArrayPaths.js

'use strict';

module.exports = function pushNestedArrayPaths(paths, nestedArray, path) {
  if (nestedArray == null) {
    return;
  }

  for (let i = 0; i < nestedArray.length; ++i) {
    if (Array.isArray(nestedArray[i])) {
      pushNestedArrayPaths(paths, nestedArray[i], path + '.' + i);
    } else {
      paths.push(path + '.' + i);
    }
  }
};

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists