Sha256: 5af02f3c15d9937aa70fbe2dbeccf3e75b353b20f3e16ba63a7073eb1157ca9b

Contents?: true

Size: 502 Bytes

Versions: 75

Compression:

Stored size: 502 Bytes

Contents

/**
 * Get cache object by `name`.
 *
 * @param {String|Function} name
 * @param {Object} options
 * @return {Object}
 * @api private
 */

var getCache = module.exports = function(name, options){
  if ('function' == typeof name) return new name(options);

  var cache;
  switch (name){
    // case 'fs':
    //   cache = require('./fs')
    //   break;
    case 'memory':
      cache = require('./memory');
      break;
    default:
      cache = require('./null');
  }
  return new cache(options);
};

Version data entries

75 entries across 23 versions & 3 rubygems

Version Path
epuber-stylus-source-0.56.0 vendor/lib/cache/index.js
epuber-stylus-source-0.54.8 vendor/lib/cache/index.js
ela-4.1.6 node_modules/poised/node_modules/stylus/lib/cache/index.js
ela-4.1.6 node_modules/codo/node_modules/nib/node_modules/stylus/lib/cache/index.js
ela-4.1.6 node_modules/nib/node_modules/stylus/lib/cache/index.js
ela-4.1.6 node_modules/stylus/lib/cache/index.js
ela-4.1.5 node_modules/poised/node_modules/stylus/lib/cache/index.js
ela-4.1.5 node_modules/codo/node_modules/nib/node_modules/stylus/lib/cache/index.js
ela-4.1.5 node_modules/stylus/lib/cache/index.js
ela-4.1.5 node_modules/nib/node_modules/stylus/lib/cache/index.js
ela-4.1.4 node_modules/nib/node_modules/stylus/lib/cache/index.js
ela-4.1.4 node_modules/poised/node_modules/stylus/lib/cache/index.js
ela-4.1.4 node_modules/stylus/lib/cache/index.js
ela-4.1.4 node_modules/codo/node_modules/nib/node_modules/stylus/lib/cache/index.js
ela-4.1.3 node_modules/codo/node_modules/nib/node_modules/stylus/lib/cache/index.js
ela-4.1.3 node_modules/poised/node_modules/stylus/lib/cache/index.js
ela-4.1.3 node_modules/stylus/lib/cache/index.js
ela-4.1.3 node_modules/nib/node_modules/stylus/lib/cache/index.js
ela-4.1.2 node_modules/poised/node_modules/stylus/lib/cache/index.js
ela-4.1.2 node_modules/stylus/lib/cache/index.js