function _getElements(input) {
      var elements;
      if (typeof input === 'string' || input instanceof String) {
        // See https://davidwalsh.name/nodelist-array for the technique transforming nodeList -> Array.
        elements = [].slice.call(document.querySelectorAll(input));
        // I checked the 'input instanceof NodeList' test in IE9 and modern browsers and it worked for me.
      } else if (Array.isArray(input) || input instanceof NodeList) {
        elements = [].slice.call(input);
      } else {
        throw new Error('The selector provided to AnchorJS was invalid.');
      }
      return elements;
    }
Turns a selector, nodeList, or array of elements into an array of elements (so we can use array methods).
It also throws errors on any other inputs. Used to handle inputs to .add and .remove.
@param  {String|Array|Nodelist} input - A CSS selector string targeting elements with anchor links,
                                        OR a nodeList / array containing the DOM elements.
@returns {Array} - An array containing the elements we want.