npm.io
2.0.1 • Published 10 years ago

call_with_config

Licence
MIT
Version
2.0.1
Deps
1
Vulns
0
Weekly
0
Stars
1

call_with_config

call funtion with config(json object)

gitter NPM version Build codecov.io js-standard-style

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())

Keywords