all files / src/ hooks.js

100% Statements 12/12
83.33% Branches 5/6
100% Functions 3/3
100% Lines 10/10
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    12× 12× 12×   12×   12×   12×       16659×             74364×    
'use strict';
 
exports.__esModule = true;
exports.optionsHook = optionsHook;
exports.hook = hook;
 
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
 
var _options = require('./options');
 
var _options2 = _interopRequireDefault(_options);
 
/** Invoke a hook on the `options` export. */
 
function optionsHook(name, a) {
  return hook(_options2['default'], name, a);
}
 
/** Invoke a "hook" method with arguments if it exists.
 *	@private
 */
 
function hook(obj, name, a, b, c) {
  if (obj[name]) return obj[name](a, b, c);
}