lib/data-store/file-data-store.js
function getDirectory (baseDir, collection) {
  let dir = collection.substring(0, collection.lastIndexOf("/"));
  dir = dir.toLowerCase();
  return path.normalize(path.join(baseDir, dir));
}
function getDirectory (baseDir, collection) {
  let dir = collection.substring(0, collection.lastIndexOf("/"));
  dir = dir.toLowerCase();
  return path.normalize(path.join(baseDir, dir));
}
function getDirectory ( baseDir , collection ) { let dir = collection . substring ( 0 , collection . lastIndexOf ( "/" ) ) ; dir = dir . toLowerCase ( ) ; return path . normalize ( path . join ( baseDir , dir ) ) ; }
Returns the directory where the given collection's JSON file is stored.

@param   {string}    baseDir    - (e.g. "/some/base/path")
@param   {string}    collection - (e.g. "/users/jdoe/orders")
@returns {string}               - (e.g. "/some/base/path/users/jdoe")
Returns the directory where the given collection s JSON file is stored .