call_with_config
v2.0.1
Published
call with config
Downloads
7
Readme
call_with_config
call funtion with config(json object)
Install
$ npm i -S call_with_config@2
API
call_with_config(key, config, cumtomKey)
- key = module name or local module
- config for param
- if cumtomKey exist, load config from config[cumtomKey]
Usages
var call_with_config = require('.')
var r = call_with_config('./favicon', {
'./favicon':{
'path': 'sss'
},
'empty-favicon':{
}
});
console.dir(r.toString())
or
var call_with_config = require('.')
var r = call_with_config('koa-favicon', {
'koa-favicon':{
'path': 'sss',
'options': {
'maxAge': 1
}
}
});
console.dir(r.toString())