complete redesign: use nodejs on server instead of php - documentation to be updated
This commit is contained in:
25
nodejs/node_modules/stylus/lib/cache/index.js
generated
vendored
Normal file
25
nodejs/node_modules/stylus/lib/cache/index.js
generated
vendored
Normal file
@@ -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);
|
||||
};
|
Reference in New Issue
Block a user