lib/fs-memory-store.js
function Store(dir, options) {
  // Specify the directory and its options
  assert(dir, '`Store` expected a `dir` (directory) to be passed in but it was not defined');
  this.dir = dir;
  this.memoryCache = {};

  // Fallback options
  options = options || {};
  this.ext = options.ext || Store.ext;
  this.stringify = options.stringify || Store.stringify;
  this.parse = options.parse || Store.parse;
}
function Store(dir, options) {
  // Specify the directory and its options
  assert(dir, '`Store` expected a `dir` (directory) to be passed in but it was not defined');
  this.dir = dir;
  this.memoryCache = {};

  // Fallback options
  options = options || {};
  this.ext = options.ext || Store.ext;
  this.stringify = options.stringify || Store.stringify;
  this.parse = options.parse || Store.parse;
}
function Store ( dir , options ) { // Specify the directory and its options assert ( dir , '`Store` expected a `dir` (directory) to be passed in but it was not defined' ) ; this . dir = dir ; this . memoryCache = { } ; // Fallback options options = options || { } ; this . ext = options . ext || Store . ext ; this . stringify = options . stringify || Store . stringify ; this . parse = options . parse || Store . parse ; }
Filesystem storage system with in-memory cache
@param dir {String} Directory to generate our store inside of
@param options {Object} Container for options/flags
@param [options.ext='.json'] {String} Optional extension to save values under
@param [options.stringify=JSON.stringify] {Function} Optional stringifier to pass values through
@param [options.parse=JSON.parse] {Function} Optional parser to load values through
Filesystem storage system with in - memory cache