diff options
Diffstat (limited to 'node_modules/stylus/lib/cache/index.js')
| -rw-r--r-- | node_modules/stylus/lib/cache/index.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/node_modules/stylus/lib/cache/index.js b/node_modules/stylus/lib/cache/index.js new file mode 100644 index 00000000..58a0f6c8 --- /dev/null +++ b/node_modules/stylus/lib/cache/index.js @@ -0,0 +1,25 @@ +/** + * 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); +}; |
