function popStack (stack) {
if (stack) {
  var lines = stack.split('\n');

  if (lines.length < 2) {
    // The stack only has one line, so there's nothing we can remove
    return stack;
  }

  // Find the `onoFactory` call in the stack, and remove it
  for (var i = 0; i < lines.length; i++) {
    var line = lines[i];
    if (line.indexOf('onoFactory') >= 0) {
      lines.splice(i, 1);
      return lines.join('\n');
    }
  }

  // If we get here, then the stack doesn't contain a call to `onoFactory`.
  // This may be due to minification or some optimization of the JS engine.
  // So just return the stack as-is.
  return stack;
}
}
Removes Ono from the stack, so that the stack starts at the original error location

@param {string} stack
@returns {string}