call_with_config

2.0.1 • Public • Published

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

Package Sidebar

Install

npm i call_with_config

Weekly Downloads

5

Version

2.0.1

License

MIT

Last publish

Collaborators

  • zhaoxingyue
  • zhangyuang
  • langshu