This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/stylus/lib/cache/index.js
2019-08-11 20:48:02 +02:00

25 lines
502 B
JavaScript

/**
* 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);
};