lib/ObjectPaths.js
/**
   * Convert an object to a list of paths up to the given depth
   * @param obj The object to get the paths of
   * @param filter A filter to use to avoid traversing properties. i.e. Promises
   * @param depth The depth to go
   * @returns {Array} The array of paths
   */
Convert an object to a list of paths up to the given depth
@param obj The object to get the paths of
@param filter A filter to use to avoid traversing properties.
Convert an object to a list of paths up to the given depth @param obj The object to get the paths of @param filter A filter to use to avoid traversing properties .
function toPaths(obj, filter, depth) {
    var paths = [];
    var pass = function pass() {
      return true;
    };
    toPathStrings(obj, null, paths, depth, filter || pass);
    return paths;
  }
function toPaths ( obj , filter , depth ) { var paths = [ ] ; var pass = function pass ( ) { return true ; } ; toPathStrings ( obj , null , paths , depth , filter || pass ) ; return paths ; }
Convert an object to a list of paths up to the given depth
 @param obj The object to get the paths of
 @param filter A filter to use to avoid traversing properties.
Convert an object to a list of paths up to the given depth @param obj The object to get the paths of @param filter A filter to use to avoid traversing properties .