function containsNode(outerNode, innerNode) {
  if (!outerNode || !innerNode) {
    return false;
  } else if (outerNode === innerNode) {
    return true;
  } else if (isTextNode(outerNode)) {
    return false;
  } else if (isTextNode(innerNode)) {
    return containsNode(outerNode, innerNode.parentNode);
  } else if (outerNode.contains) {
    return outerNode.contains(innerNode);
  } else if (outerNode.compareDocumentPosition) {
    return !!(outerNode.compareDocumentPosition(innerNode) & 16);
  } else {
    return false;
  }
}
Ensure that the argument is an array by wrapping it in an array if it is not.
Creates a copy of the argument if it is already an array.

This is mostly useful idiomatically:

  var createArrayFrom = require('createArrayFrom');

  function takesOneOrMoreThings(things) {
    things = createArrayFrom(things);
    ...
  }

This allows you to treat `things' as an array, but accept scalars in the API.

If you need to convert an array-like object, like `arguments`, into an array
use toArray instead.

@param {*} obj
@return {array}