Code coverage report for build/index.js

Statements: 100% (13 / 13)      Branches: 90% (9 / 10)      Functions: 100% (2 / 2)      Lines: 100% (12 / 12)      Ignored: none     

All files » build/ » index.js
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34              1       1   1   1   1         1 3   3 3 6     3     1
/**
 * @fileOverview wrap validator middleware, and handle with options
 * @author Max
 **/
 
'use strict';
 
Object.defineProperty(exports, '__esModule', {
    value: true
});
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
 
var _validator = require('./validator');
 
var _validator2 = _interopRequireDefault(_validator);
 
var defaultOptions = {
    validatorKey: 'meta',
    paramKey: 'payload'
};
 
exports['default'] = function () {
    var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
 
    var realOptions = {};
    for (var i in defaultOptions) {
        realOptions[i] = options[i] || defaultOptions[i];
    }
 
    return (0, _validator2['default'])(realOptions);
};
 
module.exports = exports['default'];