lib/apply_hooks.js
function compareHooks(a, b)
{
  return a.length < b.length ? -1 : (a.length > b.length ? 1 : (a < b ? -1 : (a > b ? 1 : 0)));
}
function compareHooks(a, b)
{
  return a.length < b.length ? -1 : (a.length > b.length ? 1 : (a < b ? -1 : (a > b ? 1 : 0)));
}
function compareHooks ( a , b ) { return a . length < b . length ? - 1 : ( a . length > b . length ? 1 : ( a < b ? - 1 : ( a > b ? 1 : 0 ) ) ) ; }
Compares hook names shorter to longer and alphabetically

@param   {string} a - first key
@param   {string} b - second key
@returns {number} -1 - `a` comes first, 0 - positions unchanged, 1 - `b` comes first
Compares hook names shorter to longer and alphabetically